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

libjsonnet.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1047|      2|{
 1048|      2|    std::map<BinaryOp, int> r;
 1049|       |
 1050|      2|    r[BOP_MULT] = 5;
 1051|      2|    r[BOP_DIV] = 5;
 1052|      2|    r[BOP_PERCENT] = 5;
 1053|       |
 1054|      2|    r[BOP_PLUS] = 6;
 1055|      2|    r[BOP_MINUS] = 6;
 1056|       |
 1057|      2|    r[BOP_SHIFT_L] = 7;
 1058|      2|    r[BOP_SHIFT_R] = 7;
 1059|       |
 1060|      2|    r[BOP_GREATER] = 8;
 1061|      2|    r[BOP_GREATER_EQ] = 8;
 1062|      2|    r[BOP_LESS] = 8;
 1063|      2|    r[BOP_LESS_EQ] = 8;
 1064|      2|    r[BOP_IN] = 8;
 1065|       |
 1066|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1067|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1068|       |
 1069|      2|    r[BOP_BITWISE_AND] = 10;
 1070|       |
 1071|      2|    r[BOP_BITWISE_XOR] = 11;
 1072|       |
 1073|      2|    r[BOP_BITWISE_OR] = 12;
 1074|       |
 1075|      2|    r[BOP_AND] = 13;
 1076|       |
 1077|      2|    r[BOP_OR] = 14;
 1078|       |
 1079|      2|    return r;
 1080|      2|}
libjsonnet.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1083|      2|{
 1084|      2|    std::map<std::string, UnaryOp> r;
 1085|      2|    r["!"] = UOP_NOT;
 1086|      2|    r["~"] = UOP_BITWISE_NOT;
 1087|      2|    r["+"] = UOP_PLUS;
 1088|      2|    r["-"] = UOP_MINUS;
 1089|      2|    return r;
 1090|      2|}
libjsonnet.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1093|      2|{
 1094|      2|    std::map<std::string, BinaryOp> r;
 1095|       |
 1096|      2|    r["*"] = BOP_MULT;
 1097|      2|    r["/"] = BOP_DIV;
 1098|      2|    r["%"] = BOP_PERCENT;
 1099|       |
 1100|      2|    r["+"] = BOP_PLUS;
 1101|      2|    r["-"] = BOP_MINUS;
 1102|       |
 1103|      2|    r["<<"] = BOP_SHIFT_L;
 1104|      2|    r[">>"] = BOP_SHIFT_R;
 1105|       |
 1106|      2|    r[">"] = BOP_GREATER;
 1107|      2|    r[">="] = BOP_GREATER_EQ;
 1108|      2|    r["<"] = BOP_LESS;
 1109|      2|    r["<="] = BOP_LESS_EQ;
 1110|      2|    r["in"] = BOP_IN;
 1111|       |
 1112|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1113|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1114|       |
 1115|      2|    r["&"] = BOP_BITWISE_AND;
 1116|      2|    r["^"] = BOP_BITWISE_XOR;
 1117|      2|    r["|"] = BOP_BITWISE_OR;
 1118|       |
 1119|      2|    r["&&"] = BOP_AND;
 1120|      2|    r["||"] = BOP_OR;
 1121|      2|    return r;
 1122|      2|}
_ZN7jsonnet8internal9AllocatorD2Ev:
 1020|  6.18k|    {
 1021|  84.4M|        for (auto x : allocated) {
  ------------------
  |  Branch (1021:21): [True: 84.4M, False: 6.18k]
  ------------------
 1022|  84.4M|            delete x;
 1023|  84.4M|        }
 1024|  6.18k|        allocated.clear();
 1025|  1.84M|        for (const auto &x : internedIdentifiers) {
  ------------------
  |  Branch (1025:28): [True: 1.84M, False: 6.18k]
  ------------------
 1026|  1.84M|            delete x.second;
 1027|  1.84M|        }
 1028|  6.18k|        internedIdentifiers.clear();
 1029|   141k|        for (const auto &x : internedBuiltins) {
  ------------------
  |  Branch (1029:28): [True: 141k, False: 6.18k]
  ------------------
 1030|   141k|            delete x.second;
 1031|   141k|        }
 1032|  6.18k|        internedBuiltins.clear();
 1033|  6.18k|    }
_ZN7jsonnet8internal10IdentifierC2ERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  113|  2.30M|    Identifier(const UString &name) : name(name) {}
_ZN7jsonnet8internal3ASTC2ERKNS0_13LocationRangeENS0_7ASTTypeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEE:
  132|  77.1M|        : location(location), type(type), openFodder(open_fodder)
  133|  77.1M|    {
  134|  77.1M|    }
_ZN7jsonnet8internal3ASTD2Ev:
  135|  84.6M|    virtual ~AST(void) {}
_ZN7jsonnet8internal8ArgParamC2ERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPKNS0_10IdentifierES9_:
  158|   496k|        : idFodder(id_fodder), id(id), expr(nullptr), commaFodder(comma_fodder)
  159|   496k|    {
  160|   496k|    }
_ZN7jsonnet8internal8ArgParamC2EPNS0_3ASTERKNSt3__16vectorINS0_13FodderElementENS4_9allocatorIS6_EEEE:
  163|  5.44M|        : id(nullptr), expr(expr), commaFodder(comma_fodder)
  164|  5.44M|    {
  165|  5.44M|    }
_ZN7jsonnet8internal8ArgParamC2ERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPKNS0_10IdentifierES9_PNS0_3ASTES9_:
  169|  11.3M|        : idFodder(id_fodder), id(id), eqFodder(eq_fodder), expr(expr), commaFodder(comma_fodder)
  170|  11.3M|    {
  171|  11.3M|    }
_ZN7jsonnet8internal17ComprehensionSpecC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEESA_PKNS0_10IdentifierESA_PNS0_3ASTE:
  187|   432k|        : kind(kind),
  188|   432k|          openFodder(open_fodder),
  189|   432k|          varFodder(var_fodder),
  190|   432k|          var(var),
  191|   432k|          inFodder(in_fodder),
  192|   432k|          expr(expr)
  193|   432k|    {
  194|   432k|    }
_ZN7jsonnet8internal5ApplyC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_RKNS6_INS0_8ArgParamENS8_ISF_EEEEbSC_SC_b:
  209|  7.92M|        : AST(lr, AST_APPLY, open_fodder),
  210|  7.92M|          target(target),
  211|  7.92M|          fodderL(fodder_l),
  212|  7.92M|          args(args),
  213|  7.92M|          trailingComma(trailing_comma),
  214|  7.92M|          fodderR(fodder_r),
  215|  7.92M|          tailstrictFodder(tailstrict_fodder),
  216|  7.92M|          tailstrict(tailstrict)
  217|  7.92M|    {
  218|  7.92M|    }
_ZN7jsonnet8internal10ApplyBraceC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESE_:
  226|  85.6k|        : AST(lr, AST_APPLY_BRACE, open_fodder), left(left), right(right)
  227|  85.6k|    {
  228|  85.6k|    }
_ZN7jsonnet8internal5Array7ElementC2EPNS0_3ASTERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  236|  2.17M|        Element(AST *expr, const Fodder &comma_fodder) : expr(expr), commaFodder(comma_fodder) {}
_ZN7jsonnet8internal5ArrayC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS1_7ElementENS8_ISD_EEEEbSC_:
  244|  1.15M|        : AST(lr, AST_ARRAY, open_fodder),
  245|  1.15M|          elements(elements),
  246|  1.15M|          trailingComma(trailing_comma),
  247|  1.15M|          closeFodder(close_fodder)
  248|  1.15M|    {
  249|  1.15M|    }
_ZN7jsonnet8internal18ArrayComprehensionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_bRKNS6_INS0_17ComprehensionSpecENS8_ISF_EEEESC_:
  262|   228k|        : AST(lr, AST_ARRAY_COMPREHENSION, open_fodder),
  263|   228k|          body(body),
  264|   228k|          commaFodder(comma_fodder),
  265|   228k|          trailingComma(trailing_comma),
  266|   228k|          specs(specs),
  267|   228k|          closeFodder(close_fodder)
  268|   228k|    {
  269|       |        assert(specs.size() > 0);
  ------------------
  |  Branch (269:9): [True: 228k, False: 0]
  ------------------
  270|   228k|    }
_ZN7jsonnet8internal6AssertC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SE_SC_SE_:
  286|   256k|        : AST(lr, AST_ASSERT, open_fodder),
  287|   256k|          cond(cond),
  288|   256k|          colonFodder(colon_fodder),
  289|   256k|          message(message),
  290|   256k|          semicolonFodder(semicolon_fodder),
  291|   256k|          rest(rest)
  292|   256k|    {
  293|   256k|    }
_ZN7jsonnet8internal6BinaryC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_NS0_8BinaryOpESE_:
  367|  6.40M|        : AST(lr, AST_BINARY, open_fodder), left(left), opFodder(op_fodder), op(op), right(right)
  368|  6.40M|    {
  369|  6.40M|    }
_ZN7jsonnet8internal19BuiltinFunctionBodyC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERKNS5_6vectorIPKNS0_10IdentifierENS9_ISH_EEEE:
  382|   141k|        : AST(lr, AST_BUILTIN_FUNCTION_BODY, Fodder{}), name(name), params(params)
  383|   141k|    {
  384|   141k|    }
_ZN7jsonnet8internal15BuiltinFunctionC2ERKNS0_13LocationRangeEPKNS0_19BuiltinFunctionBodyE:
  395|   262k|        : AST(lr, AST_BUILTIN_FUNCTION, Fodder{}), body(body)
  396|   262k|    {
  397|   262k|    }
_ZN7jsonnet8internal11ConditionalC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SE_SC_SE_:
  414|  3.02M|        : AST(lr, AST_CONDITIONAL, open_fodder),
  415|  3.02M|          cond(cond),
  416|  3.02M|          thenFodder(then_fodder),
  417|  3.02M|          branchTrue(branch_true),
  418|  3.02M|          elseFodder(else_fodder),
  419|  3.02M|          branchFalse(branch_false)
  420|  3.02M|    {
  421|  3.02M|    }
_ZN7jsonnet8internal6DollarC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  426|  33.3k|    Dollar(const LocationRange &lr, const Fodder &open_fodder) : AST(lr, AST_DOLLAR, open_fodder) {}
_ZN7jsonnet8internal5ErrorC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTE:
  433|   965k|        : AST(lr, AST_ERROR, open_fodder), expr(expr)
  434|   965k|    {
  435|   965k|    }
_ZN7jsonnet8internal8FunctionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEESC_RKNS6_INS0_8ArgParamENS8_ISD_EEEEbSC_PNS0_3ASTE:
  448|  1.62M|        : AST(lr, AST_FUNCTION, open_fodder),
  449|  1.62M|          parenLeftFodder(paren_left_fodder),
  450|  1.62M|          params(params),
  451|  1.62M|          trailingComma(trailing_comma),
  452|  1.62M|          parenRightFodder(paren_right_fodder),
  453|  1.62M|          body(body)
  454|  1.62M|    {
  455|  1.62M|    }
_ZN7jsonnet8internal6ImportC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  464|    280|        : AST(lr, AST_IMPORT, open_fodder), file(file)
  465|    280|    {
  466|    280|    }
_ZN7jsonnet8internal9ImportstrC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  473|  1.69k|        : AST(lr, AST_IMPORTSTR, open_fodder), file(file)
  474|  1.69k|    {
  475|  1.69k|    }
_ZN7jsonnet8internal9ImportbinC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  482|    630|        : AST(lr, AST_IMPORTBIN, open_fodder), file(file)
  483|    630|    {
  484|    630|    }
_ZN7jsonnet8internal5IndexC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SC_PKNS0_10IdentifierE:
  505|  4.48M|        : AST(lr, AST_INDEX, open_fodder),
  506|  4.48M|          target(target),
  507|  4.48M|          dotFodder(dot_fodder),
  508|  4.48M|          isSlice(false),
  509|  4.48M|          index(nullptr),
  510|  4.48M|          end(nullptr),
  511|  4.48M|          step(nullptr),
  512|  4.48M|          idFodder(id_fodder),
  513|  4.48M|          id(id)
  514|  4.48M|    {
  515|  4.48M|    }
_ZN7jsonnet8internal5IndexC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_bSE_SC_SE_SC_SE_SC_:
  520|  3.60M|        : AST(lr, AST_INDEX, open_fodder),
  521|  3.60M|          target(target),
  522|  3.60M|          dotFodder(dot_fodder),
  523|  3.60M|          isSlice(is_slice),
  524|  3.60M|          index(index),
  525|  3.60M|          endColonFodder(end_colon_fodder),
  526|  3.60M|          end(end),
  527|  3.60M|          stepColonFodder(step_colon_fodder),
  528|  3.60M|          step(step),
  529|  3.60M|          idFodder(id_fodder),
  530|  3.60M|          id(nullptr)
  531|  3.60M|    {
  532|  3.60M|    }
_ZN7jsonnet8internal5Local4BindC2ERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEEPKNS0_10IdentifierESA_PNS0_3ASTEbSA_RKNS4_INS0_8ArgParamENS6_ISG_EEEEbSA_SA_:
  551|  2.56M|            : varFodder(var_fodder),
  552|  2.56M|              var(var),
  553|  2.56M|              opFodder(op_fodder),
  554|  2.56M|              body(body),
  555|  2.56M|              functionSugar(function_sugar),
  556|  2.56M|              parenLeftFodder(paren_left_fodder),
  557|  2.56M|              params(params),
  558|  2.56M|              trailingComma(trailing_comma),
  559|  2.56M|              parenRightFodder(paren_right_fodder),
  560|  2.56M|              closeFodder(close_fodder)
  561|  2.56M|        {
  562|  2.56M|        }
_ZN7jsonnet8internal5LocalC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS1_4BindENS8_ISD_EEEEPNS0_3ASTE:
  568|  2.89M|        : AST(lr, AST_LOCAL, open_fodder), binds(binds), body(body)
  569|  2.89M|    {
  570|  2.89M|    }
_ZN7jsonnet8internal14LiteralBooleanC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEb:
  577|   583k|        : AST(lr, AST_LITERAL_BOOLEAN, open_fodder), value(value)
  578|   583k|    {
  579|   583k|    }
_ZN7jsonnet8internal11LiteralNullC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  585|   325k|        : AST(lr, AST_LITERAL_NULL, open_fodder)
  586|   325k|    {
  587|   325k|    }
_ZN7jsonnet8internal13LiteralNumberC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS5_12basic_stringIcNS5_11char_traitsIcEENS8_IcEEEE:
  595|  4.33M|        : AST(lr, AST_LITERAL_NUMBER, open_fodder),
  596|  4.33M|          value(strtod(str.c_str(), nullptr)),
  597|  4.33M|          originalString(str)
  598|  4.33M|    {
  599|  4.33M|    }
_ZN7jsonnet8internal13LiteralStringC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS1_9TokenKindERKNSD_IcNSE_IcEENS8_IcEEEESP_:
  612|  11.9M|        : AST(lr, AST_LITERAL_STRING, open_fodder),
  613|  11.9M|          value(value),
  614|  11.9M|          tokenKind(token_kind),
  615|  11.9M|          blockIndent(block_indent),
  616|  11.9M|          blockTermIndent(block_term_indent)
  617|  11.9M|    {
  618|  11.9M|    }
_ZN7jsonnet8internal11ObjectFieldC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEESA_SA_SA_NS1_4HideEbbPNS0_3ASTEPKNS0_10IdentifierERKNS0_13LocationRangeERKNS4_INS0_8ArgParamENS6_ISK_EEEEbSA_SD_SD_SA_:
  682|  1.65M|        : kind(kind),
  683|  1.65M|          fodder1(fodder1),
  684|  1.65M|          fodder2(fodder2),
  685|  1.65M|          fodderL(fodder_l),
  686|  1.65M|          fodderR(fodder_r),
  687|  1.65M|          hide(hide),
  688|  1.65M|          superSugar(super_sugar),
  689|  1.65M|          methodSugar(method_sugar),
  690|  1.65M|          expr1(expr1),
  691|  1.65M|          id(id),
  692|  1.65M|          idLocation(id_lr),
  693|  1.65M|          params(params),
  694|  1.65M|          trailingComma(trailing_comma),
  695|  1.65M|          opFodder(op_fodder),
  696|  1.65M|          expr2(expr2),
  697|  1.65M|          expr3(expr3),
  698|  1.65M|          commaFodder(comma_fodder)
  699|  1.65M|    {
  700|       |        // Enforce what is written in comments above.
  701|  1.65M|        assert(kind != ASSERT || (hide == VISIBLE && !superSugar && !methodSugar));
  ------------------
  |  Branch (701:9): [True: 53.2k, False: 0]
  |  Branch (701:9): [True: 53.2k, False: 0]
  |  Branch (701:9): [True: 53.2k, False: 0]
  |  Branch (701:9): [True: 1.60M, False: 53.2k]
  |  Branch (701:9): [True: 1.65M, False: 0]
  ------------------
  702|  1.65M|        assert(kind != LOCAL || (hide == VISIBLE && !superSugar));
  ------------------
  |  Branch (702:9): [True: 67.4k, False: 0]
  |  Branch (702:9): [True: 67.4k, False: 0]
  |  Branch (702:9): [True: 1.59M, False: 67.4k]
  |  Branch (702:9): [True: 1.65M, False: 0]
  ------------------
  703|  1.65M|        assert(kind != FIELD_ID || (id != nullptr && expr1 == nullptr));
  ------------------
  |  Branch (703:9): [True: 1.41M, False: 0]
  |  Branch (703:9): [True: 1.41M, False: 0]
  |  Branch (703:9): [True: 240k, False: 1.41M]
  |  Branch (703:9): [True: 1.65M, False: 0]
  ------------------
  704|  1.65M|        assert(kind == FIELD_ID || kind == LOCAL || id == nullptr);
  ------------------
  |  Branch (704:9): [True: 1.41M, False: 240k]
  |  Branch (704:9): [True: 67.4k, False: 173k]
  |  Branch (704:9): [True: 173k, False: 0]
  |  Branch (704:9): [True: 1.65M, False: 0]
  ------------------
  705|  1.65M|        assert(methodSugar || (params.size() == 0 && !trailingComma));
  ------------------
  |  Branch (705:9): [True: 867k, False: 0]
  |  Branch (705:9): [True: 867k, False: 0]
  |  Branch (705:9): [True: 790k, False: 867k]
  |  Branch (705:9): [True: 1.65M, False: 0]
  ------------------
  706|  1.65M|        assert(kind == ASSERT || expr3 == nullptr);
  ------------------
  |  Branch (706:9): [True: 53.2k, False: 1.60M]
  |  Branch (706:9): [True: 1.60M, False: 0]
  |  Branch (706:9): [True: 1.65M, False: 0]
  ------------------
  707|  1.65M|    }
_ZN7jsonnet8internal11ObjectField5LocalERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEES9_S9_S9_bPKNS0_10IdentifierERKNS3_INS0_8ArgParamENS5_ISD_EEEEbS9_PNS0_3ASTES9_:
  713|  44.6k|    {
  714|  44.6k|        return ObjectField(LOCAL,
  715|  44.6k|                           fodder1,
  716|  44.6k|                           fodder2,
  717|  44.6k|                           fodder_l,
  718|  44.6k|                           fodder_r,
  719|  44.6k|                           VISIBLE,
  720|  44.6k|                           false,
  721|  44.6k|                           method_sugar,
  722|  44.6k|                           nullptr,
  723|  44.6k|                           id,
  724|  44.6k|                           LocationRange(),
  725|  44.6k|                           params,
  726|  44.6k|                           trailing_comma,
  727|  44.6k|                           op_fodder,
  728|  44.6k|                           body,
  729|  44.6k|                           nullptr,
  730|  44.6k|                           comma_fodder);
  731|  44.6k|    }
_ZN7jsonnet8internal11ObjectField5LocalERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEES9_PKNS0_10IdentifierES9_PNS0_3ASTES9_:
  734|  22.7k|    {
  735|  22.7k|        return ObjectField(LOCAL,
  736|  22.7k|                           fodder1,
  737|  22.7k|                           fodder2,
  738|  22.7k|                           Fodder{},
  739|  22.7k|                           Fodder{},
  740|  22.7k|                           VISIBLE,
  741|  22.7k|                           false,
  742|  22.7k|                           false,
  743|  22.7k|                           nullptr,
  744|  22.7k|                           id,
  745|  22.7k|                           LocationRange(),
  746|  22.7k|                           ArgParams{},
  747|  22.7k|                           false,
  748|  22.7k|                           op_fodder,
  749|  22.7k|                           body,
  750|  22.7k|                           nullptr,
  751|  22.7k|                           comma_fodder);
  752|  22.7k|    }
_ZN7jsonnet8internal11ObjectField6AssertERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPNS0_3ASTES9_SB_S9_:
  779|  53.2k|    {
  780|  53.2k|        return ObjectField(ASSERT,
  781|  53.2k|                           fodder1,
  782|  53.2k|                           Fodder{},
  783|  53.2k|                           Fodder{},
  784|  53.2k|                           Fodder{},
  785|  53.2k|                           VISIBLE,
  786|  53.2k|                           false,
  787|  53.2k|                           false,
  788|  53.2k|                           nullptr,
  789|  53.2k|                           nullptr,
  790|  53.2k|                           LocationRange(),
  791|  53.2k|                           ArgParams{},
  792|  53.2k|                           false,
  793|  53.2k|                           op_fodder,
  794|  53.2k|                           body,
  795|  53.2k|                           msg,
  796|  53.2k|                           comma_fodder);
  797|  53.2k|    }
_ZN7jsonnet8internal6ObjectC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS0_11ObjectFieldENS8_ISD_EEEEbSC_:
  812|   362k|        : AST(lr, AST_OBJECT, open_fodder),
  813|   362k|          fields(fields),
  814|   362k|          trailingComma(trailing_comma),
  815|   362k|          closeFodder(close_fodder)
  816|   362k|    {
  817|   362k|        assert(fields.size() > 0 || !trailing_comma);
  ------------------
  |  Branch (817:9): [True: 327k, False: 34.5k]
  |  Branch (817:9): [True: 34.5k, False: 0]
  |  Branch (817:9): [True: 362k, False: 0]
  ------------------
  818|   362k|        if (fields.size() > 0)
  ------------------
  |  Branch (818:13): [True: 327k, False: 34.5k]
  ------------------
  819|       |            assert(trailing_comma || fields[fields.size() - 1].commaFodder.size() == 0);
  ------------------
  |  Branch (819:13): [True: 87.5k, False: 240k]
  |  Branch (819:13): [True: 240k, False: 0]
  |  Branch (819:13): [True: 327k, False: 0]
  ------------------
  820|   362k|    }
_ZN7jsonnet8internal15DesugaredObject5FieldC2ENS0_11ObjectField4HideEPNS0_3ASTES6_:
  833|  1.72M|            : hide(hide), name(name), body(body)
  834|  1.72M|        {
  835|  1.72M|        }
_ZN7jsonnet8internal15DesugaredObjectC2ERKNS0_13LocationRangeERKNSt3__14listIPNS0_3ASTENS5_9allocatorIS8_EEEERKNS5_6vectorINS1_5FieldENS9_ISF_EEEE:
  841|   357k|        : AST(lr, AST_DESUGARED_OBJECT, Fodder{}), asserts(asserts), fields(fields)
  842|   357k|    {
  843|   357k|    }
_ZN7jsonnet8internal19ObjectComprehensionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS0_11ObjectFieldENS8_ISD_EEEEbRKNS6_INS0_17ComprehensionSpecENS8_ISI_EEEESC_:
  856|  28.5k|        : AST(lr, AST_OBJECT_COMPREHENSION, open_fodder),
  857|  28.5k|          fields(fields),
  858|  28.5k|          trailingComma(trailing_comma),
  859|  28.5k|          specs(specs),
  860|  28.5k|          closeFodder(close_fodder)
  861|  28.5k|    {
  862|  28.5k|    }
_ZN7jsonnet8internal25ObjectComprehensionSimpleC2ERKNS0_13LocationRangeEPNS0_3ASTES6_PKNS0_10IdentifierES6_:
  873|  28.4k|        : AST(lr, AST_OBJECT_COMPREHENSION_SIMPLE, Fodder{}),
  874|  28.4k|          field(field),
  875|  28.4k|          value(value),
  876|  28.4k|          id(id),
  877|  28.4k|          array(array)
  878|  28.4k|    {
  879|  28.4k|    }
_ZN7jsonnet8internal6ParensC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_:
  888|   312k|        : AST(lr, AST_PARENS, open_fodder), expr(expr), closeFodder(close_fodder)
  889|   312k|    {
  890|   312k|    }
_ZN7jsonnet8internal4SelfC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  895|  67.1k|    Self(const LocationRange &lr, const Fodder &open_fodder) : AST(lr, AST_SELF, open_fodder) {}
_ZN7jsonnet8internal10SuperIndexC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEESC_PNS0_3ASTESC_PKNS0_10IdentifierE:
  910|  14.7k|        : AST(lr, AST_SUPER_INDEX, open_fodder),
  911|  14.7k|          dotFodder(dot_fodder),
  912|  14.7k|          index(index),
  913|  14.7k|          idFodder(id_fodder),
  914|  14.7k|          id(id)
  915|  14.7k|    {
  916|  14.7k|    }
_ZN7jsonnet8internal7InSuperC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SC_:
  927|  14.1k|        : AST(lr, AST_IN_SUPER, open_fodder),
  928|  14.1k|          element(element),
  929|  14.1k|          inFodder(in_fodder),
  930|  14.1k|          superFodder(super_fodder)
  931|  14.1k|    {
  932|  14.1k|    }
_ZN7jsonnet8internal5UnaryC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS0_7UnaryOpEPNS0_3ASTE:
  956|   570k|        : AST(lr, AST_UNARY, open_fodder), op(op), expr(expr)
  957|   570k|    {
  958|   570k|    }
_ZN7jsonnet8internal3VarC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPKNS0_10IdentifierE:
  965|  25.0M|        : AST(lr, AST_VAR, open_fodder), id(id)
  966|  25.0M|    {
  967|  25.0M|    }
_ZN7jsonnet8internal9Allocator14makeIdentifierERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  998|  43.7M|    {
  999|  43.7M|        auto it = internedIdentifiers.find(name);
 1000|  43.7M|        if (it != internedIdentifiers.end()) {
  ------------------
  |  Branch (1000:13): [True: 41.9M, False: 1.84M]
  ------------------
 1001|  41.9M|            return it->second;
 1002|  41.9M|        }
 1003|  1.84M|        auto r = new Identifier(name);
 1004|  1.84M|        internedIdentifiers[name] = r;
 1005|  1.84M|        return r;
 1006|  43.7M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1047|      2|{
 1048|      2|    std::map<BinaryOp, int> r;
 1049|       |
 1050|      2|    r[BOP_MULT] = 5;
 1051|      2|    r[BOP_DIV] = 5;
 1052|      2|    r[BOP_PERCENT] = 5;
 1053|       |
 1054|      2|    r[BOP_PLUS] = 6;
 1055|      2|    r[BOP_MINUS] = 6;
 1056|       |
 1057|      2|    r[BOP_SHIFT_L] = 7;
 1058|      2|    r[BOP_SHIFT_R] = 7;
 1059|       |
 1060|      2|    r[BOP_GREATER] = 8;
 1061|      2|    r[BOP_GREATER_EQ] = 8;
 1062|      2|    r[BOP_LESS] = 8;
 1063|      2|    r[BOP_LESS_EQ] = 8;
 1064|      2|    r[BOP_IN] = 8;
 1065|       |
 1066|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1067|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1068|       |
 1069|      2|    r[BOP_BITWISE_AND] = 10;
 1070|       |
 1071|      2|    r[BOP_BITWISE_XOR] = 11;
 1072|       |
 1073|      2|    r[BOP_BITWISE_OR] = 12;
 1074|       |
 1075|      2|    r[BOP_AND] = 13;
 1076|       |
 1077|      2|    r[BOP_OR] = 14;
 1078|       |
 1079|      2|    return r;
 1080|      2|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1083|      2|{
 1084|      2|    std::map<std::string, UnaryOp> r;
 1085|      2|    r["!"] = UOP_NOT;
 1086|      2|    r["~"] = UOP_BITWISE_NOT;
 1087|      2|    r["+"] = UOP_PLUS;
 1088|      2|    r["-"] = UOP_MINUS;
 1089|      2|    return r;
 1090|      2|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1093|      2|{
 1094|      2|    std::map<std::string, BinaryOp> r;
 1095|       |
 1096|      2|    r["*"] = BOP_MULT;
 1097|      2|    r["/"] = BOP_DIV;
 1098|      2|    r["%"] = BOP_PERCENT;
 1099|       |
 1100|      2|    r["+"] = BOP_PLUS;
 1101|      2|    r["-"] = BOP_MINUS;
 1102|       |
 1103|      2|    r["<<"] = BOP_SHIFT_L;
 1104|      2|    r[">>"] = BOP_SHIFT_R;
 1105|       |
 1106|      2|    r[">"] = BOP_GREATER;
 1107|      2|    r[">="] = BOP_GREATER_EQ;
 1108|      2|    r["<"] = BOP_LESS;
 1109|      2|    r["<="] = BOP_LESS_EQ;
 1110|      2|    r["in"] = BOP_IN;
 1111|       |
 1112|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1113|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1114|       |
 1115|      2|    r["&"] = BOP_BITWISE_AND;
 1116|      2|    r["^"] = BOP_BITWISE_XOR;
 1117|      2|    r["|"] = BOP_BITWISE_OR;
 1118|       |
 1119|      2|    r["&&"] = BOP_AND;
 1120|      2|    r["||"] = BOP_OR;
 1121|      2|    return r;
 1122|      2|}
_ZN7jsonnet8internal9Allocator4makeINS0_6AssertEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SF_SG_SF_EEEPT_DpOT0_:
  980|   256k|    {
  981|   256k|        auto r = new T(std::forward<Args>(args)...);
  982|   256k|        allocated.push_back(r);
  983|   256k|        return r;
  984|   256k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ErrorEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|   409k|    {
  981|   409k|        auto r = new T(std::forward<Args>(args)...);
  982|   409k|        allocated.push_back(r);
  983|   409k|        return r;
  984|   409k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SF_SG_SF_EEEPT_DpOT0_:
  980|  2.01M|    {
  981|  2.01M|        auto r = new T(std::forward<Args>(args)...);
  982|  2.01M|        allocated.push_back(r);
  983|  2.01M|        return r;
  984|  2.01M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SF_SA_DnEEEPT_DpOT0_:
  980|  25.2k|    {
  981|  25.2k|        auto r = new T(std::forward<Args>(args)...);
  982|  25.2k|        allocated.push_back(r);
  983|  25.2k|        return r;
  984|  25.2k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERSA_RNS6_INS0_8ArgParamENS8_ISE_EEEERbSD_RPNS0_3ASTEEEEPT_DpOT0_:
  980|   125k|    {
  981|   125k|        auto r = new T(std::forward<Args>(args)...);
  982|   125k|        allocated.push_back(r);
  983|   125k|        return r;
  984|   125k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ImportEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  980|    280|    {
  981|    280|        auto r = new T(std::forward<Args>(args)...);
  982|    280|        allocated.push_back(r);
  983|    280|        return r;
  984|    280|    }
_ZN7jsonnet8internal9Allocator4makeINS0_9ImportstrEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  980|  1.69k|    {
  981|  1.69k|        auto r = new T(std::forward<Args>(args)...);
  982|  1.69k|        allocated.push_back(r);
  983|  1.69k|        return r;
  984|  1.69k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_9ImportbinEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  980|    630|    {
  981|    630|        auto r = new T(std::forward<Args>(args)...);
  982|    630|        allocated.push_back(r);
  983|    630|        return r;
  984|    630|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS3_4BindENS8_ISD_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|  1.51M|    {
  981|  1.51M|        auto r = new T(std::forward<Args>(args)...);
  982|  1.51M|        allocated.push_back(r);
  983|  1.51M|        return r;
  984|  1.51M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5UnaryEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS0_7UnaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  980|   419k|    {
  981|   419k|        auto r = new T(std::forward<Args>(args)...);
  982|   419k|        allocated.push_back(r);
  983|   419k|        return r;
  984|   419k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ObjectEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS0_11ObjectFieldENS8_ISD_EEEERbRSA_EEEPT_DpOT0_:
  980|   362k|    {
  981|   362k|        auto r = new T(std::forward<Args>(args)...);
  982|   362k|        allocated.push_back(r);
  983|   362k|        return r;
  984|   362k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_19ObjectComprehensionEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS0_11ObjectFieldENS8_ISD_EEEERbRNS6_INS0_17ComprehensionSpecENS8_ISI_EEEERSA_EEEPT_DpOT0_:
  980|  28.5k|    {
  981|  28.5k|        auto r = new T(std::forward<Args>(args)...);
  982|  28.5k|        allocated.push_back(r);
  983|  28.5k|        return r;
  984|  28.5k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS6_12basic_stringIDiNS6_11char_traitsIDiEENS9_IDiEEEENS3_9TokenKindERA1_KcSL_EEEPT_DpOT0_:
  980|  87.8k|    {
  981|  87.8k|        auto r = new T(std::forward<Args>(args)...);
  982|  87.8k|        allocated.push_back(r);
  983|  87.8k|        return r;
  984|  87.8k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS6_12basic_stringIDiNS6_11char_traitsIDiEENS9_IDiEEEENS3_9TokenKindERNSD_IcNSE_IcEENS9_IcEEEESM_EEEPT_DpOT0_:
  980|  2.40k|    {
  981|  2.40k|        auto r = new T(std::forward<Args>(args)...);
  982|  2.40k|        allocated.push_back(r);
  983|  2.40k|        return r;
  984|  2.40k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS6_INS3_7ElementENS8_ISC_EEEEbSB_EEEPT_DpOT0_:
  980|   142k|    {
  981|   142k|        auto r = new T(std::forward<Args>(args)...);
  982|   142k|        allocated.push_back(r);
  983|   142k|        return r;
  984|   142k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_18ArrayComprehensionEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESB_RbRNS6_INS0_17ComprehensionSpecENS8_ISG_EEEESB_EEEPT_DpOT0_:
  980|   200k|    {
  981|   200k|        auto r = new T(std::forward<Args>(args)...);
  982|   200k|        allocated.push_back(r);
  983|   200k|        return r;
  984|   200k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS3_7ElementENS8_ISC_EEEERbSB_EEEPT_DpOT0_:
  980|   530k|    {
  981|   530k|        auto r = new T(std::forward<Args>(args)...);
  982|   530k|        allocated.push_back(r);
  983|   530k|        return r;
  984|   530k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ParensEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESB_EEEPT_DpOT0_:
  980|   312k|    {
  981|   312k|        auto r = new T(std::forward<Args>(args)...);
  982|   312k|        allocated.push_back(r);
  983|   312k|        return r;
  984|   312k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS5_12basic_stringIcNS5_11char_traitsIcEENS8_IcEEEEEEEPT_DpOT0_:
  980|  3.82M|    {
  981|  3.82M|        auto r = new T(std::forward<Args>(args)...);
  982|  3.82M|        allocated.push_back(r);
  983|  3.82M|        return r;
  984|  3.82M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS3_9TokenKindERA1_KcSK_EEEPT_DpOT0_:
  980|  3.00M|    {
  981|  3.00M|        auto r = new T(std::forward<Args>(args)...);
  982|  3.00M|        allocated.push_back(r);
  983|  3.00M|        return r;
  984|  3.00M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS3_9TokenKindERNSC_IcNSD_IcEENS8_IcEEEESL_EEEPT_DpOT0_:
  980|  1.63k|    {
  981|  1.63k|        auto r = new T(std::forward<Args>(args)...);
  982|  1.63k|        allocated.push_back(r);
  983|  1.63k|        return r;
  984|  1.63k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_14LiteralBooleanEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEbEEEPT_DpOT0_:
  980|   531k|    {
  981|   531k|        auto r = new T(std::forward<Args>(args)...);
  982|   531k|        allocated.push_back(r);
  983|   531k|        return r;
  984|   531k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11LiteralNullEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_DpOT0_:
  980|   113k|    {
  981|   113k|        auto r = new T(std::forward<Args>(args)...);
  982|   113k|        allocated.push_back(r);
  983|   113k|        return r;
  984|   113k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6DollarEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_DpOT0_:
  980|  33.3k|    {
  981|  33.3k|        auto r = new T(std::forward<Args>(args)...);
  982|  33.3k|        allocated.push_back(r);
  983|  33.3k|        return r;
  984|  33.3k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  19.5M|    {
  981|  19.5M|        auto r = new T(std::forward<Args>(args)...);
  982|  19.5M|        allocated.push_back(r);
  983|  19.5M|        return r;
  984|  19.5M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_4SelfEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_DpOT0_:
  980|  43.9k|    {
  981|  43.9k|        auto r = new T(std::forward<Args>(args)...);
  982|  43.9k|        allocated.push_back(r);
  983|  43.9k|        return r;
  984|  43.9k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10SuperIndexEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEESB_RPNS0_3ASTESB_RPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|    900|    {
  981|    900|        auto r = new T(std::forward<Args>(args)...);
  982|    900|        allocated.push_back(r);
  983|    900|        return r;
  984|    900|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RbSF_SG_SF_SG_SF_SG_EEEPT_DpOT0_:
  980|  1.10M|    {
  981|  1.10M|        auto r = new T(std::forward<Args>(args)...);
  982|  1.10M|        allocated.push_back(r);
  983|  1.10M|        return r;
  984|  1.10M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SG_RPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  4.48M|    {
  981|  4.48M|        auto r = new T(std::forward<Args>(args)...);
  982|  4.48M|        allocated.push_back(r);
  983|  4.48M|        return r;
  984|  4.48M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RNS6_INS0_8ArgParamENS8_ISH_EEEERbSG_SG_SL_EEEPT_DpOT0_:
  980|  5.06M|    {
  981|  5.06M|        auto r = new T(std::forward<Args>(args)...);
  982|  5.06M|        allocated.push_back(r);
  983|  5.06M|        return r;
  984|  5.06M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10ApplyBraceEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESF_EEEPT_DpOT0_:
  980|  85.6k|    {
  981|  85.6k|        auto r = new T(std::forward<Args>(args)...);
  982|  85.6k|        allocated.push_back(r);
  983|  85.6k|        return r;
  984|  85.6k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_7InSuperEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SG_EEEPT_DpOT0_:
  980|    331|    {
  981|    331|        auto r = new T(std::forward<Args>(args)...);
  982|    331|        allocated.push_back(r);
  983|    331|        return r;
  984|    331|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RNS0_8BinaryOpESF_EEEPT_DpOT0_:
  980|  5.41M|    {
  981|  5.41M|        auto r = new T(std::forward<Args>(args)...);
  982|  5.41M|        allocated.push_back(r);
  983|  5.41M|        return r;
  984|  5.41M|    }
pass.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1047|      2|{
 1048|      2|    std::map<BinaryOp, int> r;
 1049|       |
 1050|      2|    r[BOP_MULT] = 5;
 1051|      2|    r[BOP_DIV] = 5;
 1052|      2|    r[BOP_PERCENT] = 5;
 1053|       |
 1054|      2|    r[BOP_PLUS] = 6;
 1055|      2|    r[BOP_MINUS] = 6;
 1056|       |
 1057|      2|    r[BOP_SHIFT_L] = 7;
 1058|      2|    r[BOP_SHIFT_R] = 7;
 1059|       |
 1060|      2|    r[BOP_GREATER] = 8;
 1061|      2|    r[BOP_GREATER_EQ] = 8;
 1062|      2|    r[BOP_LESS] = 8;
 1063|      2|    r[BOP_LESS_EQ] = 8;
 1064|      2|    r[BOP_IN] = 8;
 1065|       |
 1066|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1067|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1068|       |
 1069|      2|    r[BOP_BITWISE_AND] = 10;
 1070|       |
 1071|      2|    r[BOP_BITWISE_XOR] = 11;
 1072|       |
 1073|      2|    r[BOP_BITWISE_OR] = 12;
 1074|       |
 1075|      2|    r[BOP_AND] = 13;
 1076|       |
 1077|      2|    r[BOP_OR] = 14;
 1078|       |
 1079|      2|    return r;
 1080|      2|}
pass.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1083|      2|{
 1084|      2|    std::map<std::string, UnaryOp> r;
 1085|      2|    r["!"] = UOP_NOT;
 1086|      2|    r["~"] = UOP_BITWISE_NOT;
 1087|      2|    r["+"] = UOP_PLUS;
 1088|      2|    r["-"] = UOP_MINUS;
 1089|      2|    return r;
 1090|      2|}
pass.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1093|      2|{
 1094|      2|    std::map<std::string, BinaryOp> r;
 1095|       |
 1096|      2|    r["*"] = BOP_MULT;
 1097|      2|    r["/"] = BOP_DIV;
 1098|      2|    r["%"] = BOP_PERCENT;
 1099|       |
 1100|      2|    r["+"] = BOP_PLUS;
 1101|      2|    r["-"] = BOP_MINUS;
 1102|       |
 1103|      2|    r["<<"] = BOP_SHIFT_L;
 1104|      2|    r[">>"] = BOP_SHIFT_R;
 1105|       |
 1106|      2|    r[">"] = BOP_GREATER;
 1107|      2|    r[">="] = BOP_GREATER_EQ;
 1108|      2|    r["<"] = BOP_LESS;
 1109|      2|    r["<="] = BOP_LESS_EQ;
 1110|      2|    r["in"] = BOP_IN;
 1111|       |
 1112|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1113|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1114|       |
 1115|      2|    r["&"] = BOP_BITWISE_AND;
 1116|      2|    r["^"] = BOP_BITWISE_XOR;
 1117|      2|    r["|"] = BOP_BITWISE_OR;
 1118|       |
 1119|      2|    r["&&"] = BOP_AND;
 1120|      2|    r["||"] = BOP_OR;
 1121|      2|    return r;
 1122|      2|}
_ZN7jsonnet8internal9Allocator5cloneINS0_5ApplyEEEPT_S5_:
  988|   246k|    {
  989|   246k|        auto r = new T(*ast);
  990|   246k|        allocated.push_back(r);
  991|   246k|        return r;
  992|   246k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5ArrayEEEPT_S5_:
  988|   117k|    {
  989|   117k|        auto r = new T(*ast);
  990|   117k|        allocated.push_back(r);
  991|   117k|        return r;
  992|   117k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_6BinaryEEEPT_S5_:
  988|   724k|    {
  989|   724k|        auto r = new T(*ast);
  990|   724k|        allocated.push_back(r);
  991|   724k|        return r;
  992|   724k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_11ConditionalEEEPT_S5_:
  988|   332k|    {
  989|   332k|        auto r = new T(*ast);
  990|   332k|        allocated.push_back(r);
  991|   332k|        return r;
  992|   332k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_15DesugaredObjectEEEPT_S5_:
  988|   642k|    {
  989|   642k|        auto r = new T(*ast);
  990|   642k|        allocated.push_back(r);
  991|   642k|        return r;
  992|   642k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5ErrorEEEPT_S5_:
  988|  67.8k|    {
  989|  67.8k|        auto r = new T(*ast);
  990|  67.8k|        allocated.push_back(r);
  991|  67.8k|        return r;
  992|  67.8k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_8FunctionEEEPT_S5_:
  988|   159k|    {
  989|   159k|        auto r = new T(*ast);
  990|   159k|        allocated.push_back(r);
  991|   159k|        return r;
  992|   159k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_6ImportEEEPT_S5_:
  988|  1.66k|    {
  989|  1.66k|        auto r = new T(*ast);
  990|  1.66k|        allocated.push_back(r);
  991|  1.66k|        return r;
  992|  1.66k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_9ImportstrEEEPT_S5_:
  988|  6.96k|    {
  989|  6.96k|        auto r = new T(*ast);
  990|  6.96k|        allocated.push_back(r);
  991|  6.96k|        return r;
  992|  6.96k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_9ImportbinEEEPT_S5_:
  988|  1.07k|    {
  989|  1.07k|        auto r = new T(*ast);
  990|  1.07k|        allocated.push_back(r);
  991|  1.07k|        return r;
  992|  1.07k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5IndexEEEPT_S5_:
  988|   285k|    {
  989|   285k|        auto r = new T(*ast);
  990|   285k|        allocated.push_back(r);
  991|   285k|        return r;
  992|   285k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_7InSuperEEEPT_S5_:
  988|   150k|    {
  989|   150k|        auto r = new T(*ast);
  990|   150k|        allocated.push_back(r);
  991|   150k|        return r;
  992|   150k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_14LiteralBooleanEEEPT_S5_:
  988|  10.6k|    {
  989|  10.6k|        auto r = new T(*ast);
  990|  10.6k|        allocated.push_back(r);
  991|  10.6k|        return r;
  992|  10.6k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_11LiteralNullEEEPT_S5_:
  988|  6.53k|    {
  989|  6.53k|        auto r = new T(*ast);
  990|  6.53k|        allocated.push_back(r);
  991|  6.53k|        return r;
  992|  6.53k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_13LiteralNumberEEEPT_S5_:
  988|   504k|    {
  989|   504k|        auto r = new T(*ast);
  990|   504k|        allocated.push_back(r);
  991|   504k|        return r;
  992|   504k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_13LiteralStringEEEPT_S5_:
  988|  1.20M|    {
  989|  1.20M|        auto r = new T(*ast);
  990|  1.20M|        allocated.push_back(r);
  991|  1.20M|        return r;
  992|  1.20M|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5LocalEEEPT_S5_:
  988|   161k|    {
  989|   161k|        auto r = new T(*ast);
  990|   161k|        allocated.push_back(r);
  991|   161k|        return r;
  992|   161k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_25ObjectComprehensionSimpleEEEPT_S5_:
  988|  26.9k|    {
  989|  26.9k|        auto r = new T(*ast);
  990|  26.9k|        allocated.push_back(r);
  991|  26.9k|        return r;
  992|  26.9k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_4SelfEEEPT_S5_:
  988|  7.32k|    {
  989|  7.32k|        auto r = new T(*ast);
  990|  7.32k|        allocated.push_back(r);
  991|  7.32k|        return r;
  992|  7.32k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_10SuperIndexEEEPT_S5_:
  988|   151k|    {
  989|   151k|        auto r = new T(*ast);
  990|   151k|        allocated.push_back(r);
  991|   151k|        return r;
  992|   151k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5UnaryEEEPT_S5_:
  988|  1.18M|    {
  989|  1.18M|        auto r = new T(*ast);
  990|  1.18M|        allocated.push_back(r);
  991|  1.18M|        return r;
  992|  1.18M|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_3VarEEEPT_S5_:
  988|  1.52M|    {
  989|  1.52M|        auto r = new T(*ast);
  990|  1.52M|        allocated.push_back(r);
  991|  1.52M|        return r;
  992|  1.52M|    }
static_analysis.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1047|      2|{
 1048|      2|    std::map<BinaryOp, int> r;
 1049|       |
 1050|      2|    r[BOP_MULT] = 5;
 1051|      2|    r[BOP_DIV] = 5;
 1052|      2|    r[BOP_PERCENT] = 5;
 1053|       |
 1054|      2|    r[BOP_PLUS] = 6;
 1055|      2|    r[BOP_MINUS] = 6;
 1056|       |
 1057|      2|    r[BOP_SHIFT_L] = 7;
 1058|      2|    r[BOP_SHIFT_R] = 7;
 1059|       |
 1060|      2|    r[BOP_GREATER] = 8;
 1061|      2|    r[BOP_GREATER_EQ] = 8;
 1062|      2|    r[BOP_LESS] = 8;
 1063|      2|    r[BOP_LESS_EQ] = 8;
 1064|      2|    r[BOP_IN] = 8;
 1065|       |
 1066|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1067|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1068|       |
 1069|      2|    r[BOP_BITWISE_AND] = 10;
 1070|       |
 1071|      2|    r[BOP_BITWISE_XOR] = 11;
 1072|       |
 1073|      2|    r[BOP_BITWISE_OR] = 12;
 1074|       |
 1075|      2|    r[BOP_AND] = 13;
 1076|       |
 1077|      2|    r[BOP_OR] = 14;
 1078|       |
 1079|      2|    return r;
 1080|      2|}
static_analysis.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1083|      2|{
 1084|      2|    std::map<std::string, UnaryOp> r;
 1085|      2|    r["!"] = UOP_NOT;
 1086|      2|    r["~"] = UOP_BITWISE_NOT;
 1087|      2|    r["+"] = UOP_PLUS;
 1088|      2|    r["-"] = UOP_MINUS;
 1089|      2|    return r;
 1090|      2|}
static_analysis.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1093|      2|{
 1094|      2|    std::map<std::string, BinaryOp> r;
 1095|       |
 1096|      2|    r["*"] = BOP_MULT;
 1097|      2|    r["/"] = BOP_DIV;
 1098|      2|    r["%"] = BOP_PERCENT;
 1099|       |
 1100|      2|    r["+"] = BOP_PLUS;
 1101|      2|    r["-"] = BOP_MINUS;
 1102|       |
 1103|      2|    r["<<"] = BOP_SHIFT_L;
 1104|      2|    r[">>"] = BOP_SHIFT_R;
 1105|       |
 1106|      2|    r[">"] = BOP_GREATER;
 1107|      2|    r[">="] = BOP_GREATER_EQ;
 1108|      2|    r["<"] = BOP_LESS;
 1109|      2|    r["<="] = BOP_LESS_EQ;
 1110|      2|    r["in"] = BOP_IN;
 1111|       |
 1112|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1113|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1114|       |
 1115|      2|    r["&"] = BOP_BITWISE_AND;
 1116|      2|    r["^"] = BOP_BITWISE_XOR;
 1117|      2|    r["|"] = BOP_BITWISE_OR;
 1118|       |
 1119|      2|    r["&&"] = BOP_AND;
 1120|      2|    r["||"] = BOP_OR;
 1121|      2|    return r;
 1122|      2|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1047|      2|{
 1048|      2|    std::map<BinaryOp, int> r;
 1049|       |
 1050|      2|    r[BOP_MULT] = 5;
 1051|      2|    r[BOP_DIV] = 5;
 1052|      2|    r[BOP_PERCENT] = 5;
 1053|       |
 1054|      2|    r[BOP_PLUS] = 6;
 1055|      2|    r[BOP_MINUS] = 6;
 1056|       |
 1057|      2|    r[BOP_SHIFT_L] = 7;
 1058|      2|    r[BOP_SHIFT_R] = 7;
 1059|       |
 1060|      2|    r[BOP_GREATER] = 8;
 1061|      2|    r[BOP_GREATER_EQ] = 8;
 1062|      2|    r[BOP_LESS] = 8;
 1063|      2|    r[BOP_LESS_EQ] = 8;
 1064|      2|    r[BOP_IN] = 8;
 1065|       |
 1066|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1067|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1068|       |
 1069|      2|    r[BOP_BITWISE_AND] = 10;
 1070|       |
 1071|      2|    r[BOP_BITWISE_XOR] = 11;
 1072|       |
 1073|      2|    r[BOP_BITWISE_OR] = 12;
 1074|       |
 1075|      2|    r[BOP_AND] = 13;
 1076|       |
 1077|      2|    r[BOP_OR] = 14;
 1078|       |
 1079|      2|    return r;
 1080|      2|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1083|      2|{
 1084|      2|    std::map<std::string, UnaryOp> r;
 1085|      2|    r["!"] = UOP_NOT;
 1086|      2|    r["~"] = UOP_BITWISE_NOT;
 1087|      2|    r["+"] = UOP_PLUS;
 1088|      2|    r["-"] = UOP_MINUS;
 1089|      2|    return r;
 1090|      2|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1093|      2|{
 1094|      2|    std::map<std::string, BinaryOp> r;
 1095|       |
 1096|      2|    r["*"] = BOP_MULT;
 1097|      2|    r["/"] = BOP_DIV;
 1098|      2|    r["%"] = BOP_PERCENT;
 1099|       |
 1100|      2|    r["+"] = BOP_PLUS;
 1101|      2|    r["-"] = BOP_MINUS;
 1102|       |
 1103|      2|    r["<<"] = BOP_SHIFT_L;
 1104|      2|    r[">>"] = BOP_SHIFT_R;
 1105|       |
 1106|      2|    r[">"] = BOP_GREATER;
 1107|      2|    r[">="] = BOP_GREATER_EQ;
 1108|      2|    r["<"] = BOP_LESS;
 1109|      2|    r["<="] = BOP_LESS_EQ;
 1110|      2|    r["in"] = BOP_IN;
 1111|       |
 1112|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1113|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1114|       |
 1115|      2|    r["&"] = BOP_BITWISE_AND;
 1116|      2|    r["^"] = BOP_BITWISE_XOR;
 1117|      2|    r["|"] = BOP_BITWISE_OR;
 1118|       |
 1119|      2|    r["&&"] = BOP_AND;
 1120|      2|    r["||"] = BOP_OR;
 1121|      2|    return r;
 1122|      2|}
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJNS0_13LocationRangeENSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  2.87k|    {
  981|  2.87k|        auto r = new T(std::forward<Args>(args)...);
  982|  2.87k|        allocated.push_back(r);
  983|  2.87k|        return r;
  984|  2.87k|    }
vm.cpp:_ZN7jsonnet8internalL10bop_stringENS0_8BinaryOpE:
  325|    161|{
  326|    161|    switch (bop) {
  327|      7|        case BOP_MULT: return "*";
  ------------------
  |  Branch (327:9): [True: 7, False: 154]
  ------------------
  328|      6|        case BOP_DIV: return "/";
  ------------------
  |  Branch (328:9): [True: 6, False: 155]
  ------------------
  329|      0|        case BOP_PERCENT: return "%";
  ------------------
  |  Branch (329:9): [True: 0, False: 161]
  ------------------
  330|       |
  331|     52|        case BOP_PLUS: return "+";
  ------------------
  |  Branch (331:9): [True: 52, False: 109]
  ------------------
  332|      9|        case BOP_MINUS: return "-";
  ------------------
  |  Branch (332:9): [True: 9, False: 152]
  ------------------
  333|       |
  334|      4|        case BOP_SHIFT_L: return "<<";
  ------------------
  |  Branch (334:9): [True: 4, False: 157]
  ------------------
  335|      3|        case BOP_SHIFT_R: return ">>";
  ------------------
  |  Branch (335:9): [True: 3, False: 158]
  ------------------
  336|       |
  337|      9|        case BOP_GREATER: return ">";
  ------------------
  |  Branch (337:9): [True: 9, False: 152]
  ------------------
  338|     12|        case BOP_GREATER_EQ: return ">=";
  ------------------
  |  Branch (338:9): [True: 12, False: 149]
  ------------------
  339|     20|        case BOP_LESS: return "<";
  ------------------
  |  Branch (339:9): [True: 20, False: 141]
  ------------------
  340|      9|        case BOP_LESS_EQ: return "<=";
  ------------------
  |  Branch (340:9): [True: 9, False: 152]
  ------------------
  341|      0|        case BOP_IN: return "in";
  ------------------
  |  Branch (341:9): [True: 0, False: 161]
  ------------------
  342|       |
  343|      0|        case BOP_MANIFEST_EQUAL: return "==";
  ------------------
  |  Branch (343:9): [True: 0, False: 161]
  ------------------
  344|      0|        case BOP_MANIFEST_UNEQUAL: return "!=";
  ------------------
  |  Branch (344:9): [True: 0, False: 161]
  ------------------
  345|       |
  346|      8|        case BOP_BITWISE_AND: return "&";
  ------------------
  |  Branch (346:9): [True: 8, False: 153]
  ------------------
  347|     14|        case BOP_BITWISE_XOR: return "^";
  ------------------
  |  Branch (347:9): [True: 14, False: 147]
  ------------------
  348|      6|        case BOP_BITWISE_OR: return "|";
  ------------------
  |  Branch (348:9): [True: 6, False: 155]
  ------------------
  349|       |
  350|      1|        case BOP_AND: return "&&";
  ------------------
  |  Branch (350:9): [True: 1, False: 160]
  ------------------
  351|      1|        case BOP_OR: return "||";
  ------------------
  |  Branch (351:9): [True: 1, False: 160]
  ------------------
  352|       |
  353|      0|        default:
  ------------------
  |  Branch (353:9): [True: 0, False: 161]
  ------------------
  354|      0|            std::cerr << "INTERNAL ERROR: Unrecognised binary operator: " << bop << std::endl;
  355|      0|            std::abort();
  356|    161|    }
  357|    161|}
vm.cpp:_ZN7jsonnet8internalL10uop_stringENS0_7UnaryOpE:
  938|    109|{
  939|    109|    switch (uop) {
  940|     72|        case UOP_PLUS: return "+";
  ------------------
  |  Branch (940:9): [True: 72, False: 37]
  ------------------
  941|      9|        case UOP_MINUS: return "-";
  ------------------
  |  Branch (941:9): [True: 9, False: 100]
  ------------------
  942|      5|        case UOP_BITWISE_NOT: return "~";
  ------------------
  |  Branch (942:9): [True: 5, False: 104]
  ------------------
  943|     23|        case UOP_NOT: return "!";
  ------------------
  |  Branch (943:9): [True: 23, False: 86]
  ------------------
  944|       |
  945|      0|        default:
  ------------------
  |  Branch (945:9): [True: 0, False: 109]
  ------------------
  946|      0|            std::cerr << "INTERNAL ERROR: Unrecognised unary operator: " << uop << std::endl;
  947|      0|            std::abort();
  948|    109|    }
  949|    109|}
desugarer.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1047|      2|{
 1048|      2|    std::map<BinaryOp, int> r;
 1049|       |
 1050|      2|    r[BOP_MULT] = 5;
 1051|      2|    r[BOP_DIV] = 5;
 1052|      2|    r[BOP_PERCENT] = 5;
 1053|       |
 1054|      2|    r[BOP_PLUS] = 6;
 1055|      2|    r[BOP_MINUS] = 6;
 1056|       |
 1057|      2|    r[BOP_SHIFT_L] = 7;
 1058|      2|    r[BOP_SHIFT_R] = 7;
 1059|       |
 1060|      2|    r[BOP_GREATER] = 8;
 1061|      2|    r[BOP_GREATER_EQ] = 8;
 1062|      2|    r[BOP_LESS] = 8;
 1063|      2|    r[BOP_LESS_EQ] = 8;
 1064|      2|    r[BOP_IN] = 8;
 1065|       |
 1066|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1067|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1068|       |
 1069|      2|    r[BOP_BITWISE_AND] = 10;
 1070|       |
 1071|      2|    r[BOP_BITWISE_XOR] = 11;
 1072|       |
 1073|      2|    r[BOP_BITWISE_OR] = 12;
 1074|       |
 1075|      2|    r[BOP_AND] = 13;
 1076|       |
 1077|      2|    r[BOP_OR] = 14;
 1078|       |
 1079|      2|    return r;
 1080|      2|}
desugarer.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1083|      2|{
 1084|      2|    std::map<std::string, UnaryOp> r;
 1085|      2|    r["!"] = UOP_NOT;
 1086|      2|    r["~"] = UOP_BITWISE_NOT;
 1087|      2|    r["+"] = UOP_PLUS;
 1088|      2|    r["-"] = UOP_MINUS;
 1089|      2|    return r;
 1090|      2|}
desugarer.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1093|      2|{
 1094|      2|    std::map<std::string, BinaryOp> r;
 1095|       |
 1096|      2|    r["*"] = BOP_MULT;
 1097|      2|    r["/"] = BOP_DIV;
 1098|      2|    r["%"] = BOP_PERCENT;
 1099|       |
 1100|      2|    r["+"] = BOP_PLUS;
 1101|      2|    r["-"] = BOP_MINUS;
 1102|       |
 1103|      2|    r["<<"] = BOP_SHIFT_L;
 1104|      2|    r[">>"] = BOP_SHIFT_R;
 1105|       |
 1106|      2|    r[">"] = BOP_GREATER;
 1107|      2|    r[">="] = BOP_GREATER_EQ;
 1108|      2|    r["<"] = BOP_LESS;
 1109|      2|    r["<="] = BOP_LESS_EQ;
 1110|      2|    r["in"] = BOP_IN;
 1111|       |
 1112|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1113|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1114|       |
 1115|      2|    r["&"] = BOP_BITWISE_AND;
 1116|      2|    r["^"] = BOP_BITWISE_XOR;
 1117|      2|    r["|"] = BOP_BITWISE_OR;
 1118|       |
 1119|      2|    r["&&"] = BOP_AND;
 1120|      2|    r["||"] = BOP_OR;
 1121|      2|    return r;
 1122|      2|}
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_NS0_8BinaryOpESF_EEEPT_DpOT0_:
  980|  83.4k|    {
  981|  83.4k|        auto r = new T(std::forward<Args>(args)...);
  982|  83.4k|        allocated.push_back(r);
  983|  83.4k|        return r;
  984|  83.4k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERA4_KcEEEPT_DpOT0_:
  980|   485k|    {
  981|   485k|        auto r = new T(std::forward<Args>(args)...);
  982|   485k|        allocated.push_back(r);
  983|   485k|        return r;
  984|   485k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  980|   228k|    {
  981|   228k|        auto r = new T(std::forward<Args>(args)...);
  982|   228k|        allocated.push_back(r);
  983|   228k|        return r;
  984|   228k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  980|   417k|    {
  981|   417k|        auto r = new T(std::forward<Args>(args)...);
  982|   417k|        allocated.push_back(r);
  983|   417k|        return r;
  984|   417k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ArrayEEEEPT_DpOT0_:
  980|   228k|    {
  981|   228k|        auto r = new T(std::forward<Args>(args)...);
  982|   228k|        allocated.push_back(r);
  983|   228k|        return r;
  984|   228k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  980|   228k|    {
  981|   228k|        auto r = new T(std::forward<Args>(args)...);
  982|   228k|        allocated.push_back(r);
  983|   228k|        return r;
  984|   228k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  980|   437k|    {
  981|   437k|        auto r = new T(std::forward<Args>(args)...);
  982|   437k|        allocated.push_back(r);
  983|   437k|        return r;
  984|   437k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERKPNS0_3ASTESD_RSF_SD_SI_EEEPT_DpOT0_:
  980|   168k|    {
  981|   168k|        auto r = new T(std::forward<Args>(args)...);
  982|   168k|        allocated.push_back(r);
  983|   168k|        return r;
  984|   168k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  980|   248k|    {
  981|   248k|        auto r = new T(std::forward<Args>(args)...);
  982|   248k|        allocated.push_back(r);
  983|   248k|        return r;
  984|   248k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_NS7_INS0_8ArgParamENS9_ISE_EEEEbSD_PNS0_11ConditionalEEEEPT_DpOT0_:
  980|   248k|    {
  981|   248k|        auto r = new T(std::forward<Args>(args)...);
  982|   248k|        allocated.push_back(r);
  983|   248k|        return r;
  984|   248k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_6BinaryESD_RPNS0_3ASTESD_PNS0_5LocalEEEEPT_DpOT0_:
  980|   248k|    {
  981|   248k|        auto r = new T(std::forward<Args>(args)...);
  982|   248k|        allocated.push_back(r);
  983|   248k|        return r;
  984|   248k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ApplyEEEEPT_DpOT0_:
  980|   248k|    {
  981|   248k|        auto r = new T(std::forward<Args>(args)...);
  982|   248k|        allocated.push_back(r);
  983|   248k|        return r;
  984|   248k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|   255k|    {
  981|   255k|        auto r = new T(std::forward<Args>(args)...);
  982|   255k|        allocated.push_back(r);
  983|   255k|        return r;
  984|   255k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bSG_SE_DnSE_DnSE_EEEPT_DpOT0_:
  980|   248k|    {
  981|   248k|        auto r = new T(std::forward<Args>(args)...);
  982|   248k|        allocated.push_back(r);
  983|   248k|        return r;
  984|   248k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ApplyESD_SF_SD_PNS0_5ErrorEEEEPT_DpOT0_:
  980|   248k|    {
  981|   248k|        auto r = new T(std::forward<Args>(args)...);
  982|   248k|        allocated.push_back(r);
  983|   248k|        return r;
  984|   248k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS8_INS3_7ElementENSA_ISF_EEEEbSE_EEEPT_DpOT0_:
  980|   228k|    {
  981|   228k|        auto r = new T(std::forward<Args>(args)...);
  982|   228k|        allocated.push_back(r);
  983|   228k|        return r;
  984|   228k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERKNS7_12basic_stringIDiNS7_11char_traitsIDiEENSA_IDiEEEENS3_9TokenKindERA1_KcSP_EEEPT_DpOT0_:
  980|  8.89M|    {
  981|  8.89M|        auto r = new T(std::forward<Args>(args)...);
  982|  8.89M|        allocated.push_back(r);
  983|  8.89M|        return r;
  984|  8.89M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ErrorEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|   556k|    {
  981|   556k|        auto r = new T(std::forward<Args>(args)...);
  982|   556k|        allocated.push_back(r);
  983|   556k|        return r;
  984|   556k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_SF_SH_SF_EEEPT_DpOT0_:
  980|   256k|    {
  981|   256k|        auto r = new T(std::forward<Args>(args)...);
  982|   256k|        allocated.push_back(r);
  983|   256k|        return r;
  984|   256k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralStringESE_DnSE_DnSE_EEEPT_DpOT0_:
  980|  2.19M|    {
  981|  2.19M|        auto r = new T(std::forward<Args>(args)...);
  982|  2.19M|        allocated.push_back(r);
  983|  2.19M|        return r;
  984|  2.19M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_RNS7_INS0_8ArgParamENS9_ISI_EEEEbSH_SH_bEEEPT_DpOT0_:
  980|   191k|    {
  981|   191k|        auto r = new T(std::forward<Args>(args)...);
  982|   191k|        allocated.push_back(r);
  983|   191k|        return r;
  984|   191k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5IndexESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  980|  1.38M|    {
  981|  1.38M|        auto r = new T(std::forward<Args>(args)...);
  982|  1.38M|        allocated.push_back(r);
  983|  1.38M|        return r;
  984|  1.38M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5UnaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS0_7UnaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  980|   151k|    {
  981|   151k|        auto r = new T(std::forward<Args>(args)...);
  982|   151k|        allocated.push_back(r);
  983|   151k|        return r;
  984|   151k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11LiteralNullEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  980|   212k|    {
  981|   212k|        auto r = new T(std::forward<Args>(args)...);
  982|   212k|        allocated.push_back(r);
  983|   212k|        return r;
  984|   212k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  5.30M|    {
  981|  5.30M|        auto r = new T(std::forward<Args>(args)...);
  982|  5.30M|        allocated.push_back(r);
  983|  5.30M|        return r;
  984|  5.30M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5IndexESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  980|   615k|    {
  981|   615k|        auto r = new T(std::forward<Args>(args)...);
  982|   615k|        allocated.push_back(r);
  983|   615k|        return r;
  984|   615k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESC_RNS7_INS0_8ArgParamENS9_ISD_EEEEbSC_RPNS0_3ASTEEEEPT_DpOT0_:
  980|   462k|    {
  981|   462k|        auto r = new T(std::forward<Args>(args)...);
  982|   462k|        allocated.push_back(r);
  983|   462k|        return r;
  984|   462k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_4SelfEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  980|  23.1k|    {
  981|  23.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  23.1k|        allocated.push_back(r);
  983|  23.1k|        return r;
  984|  23.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_PNS0_14LiteralBooleanESD_PNS0_5ErrorEEEEPT_DpOT0_:
  980|  51.9k|    {
  981|  51.9k|        auto r = new T(std::forward<Args>(args)...);
  982|  51.9k|        allocated.push_back(r);
  983|  51.9k|        return r;
  984|  51.9k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_14LiteralBooleanEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEbEEEPT_DpOT0_:
  980|  51.9k|    {
  981|  51.9k|        auto r = new T(std::forward<Args>(args)...);
  982|  51.9k|        allocated.push_back(r);
  983|  51.9k|        return r;
  984|  51.9k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERSB_RNS7_INS0_8ArgParamENS9_ISF_EEEERbSE_RPNS0_3ASTEEEEPT_DpOT0_:
  980|   790k|    {
  981|   790k|        auto r = new T(std::forward<Args>(args)...);
  982|   790k|        allocated.push_back(r);
  983|   790k|        return r;
  984|   790k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|   138k|    {
  981|   138k|        auto r = new T(std::forward<Args>(args)...);
  982|   138k|        allocated.push_back(r);
  983|   138k|        return r;
  984|   138k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_7InSuperESD_PNS0_6BinaryESD_PNS0_3ASTEEEEPT_DpOT0_:
  980|  13.8k|    {
  981|  13.8k|        auto r = new T(std::forward<Args>(args)...);
  982|  13.8k|        allocated.push_back(r);
  983|  13.8k|        return r;
  984|  13.8k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_7InSuperEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_SD_EEEPT_DpOT0_:
  980|  13.8k|    {
  981|  13.8k|        auto r = new T(std::forward<Args>(args)...);
  982|  13.8k|        allocated.push_back(r);
  983|  13.8k|        return r;
  984|  13.8k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_10SuperIndexESD_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  980|  13.8k|    {
  981|  13.8k|        auto r = new T(std::forward<Args>(args)...);
  982|  13.8k|        allocated.push_back(r);
  983|  13.8k|        return r;
  984|  13.8k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10SuperIndexEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_PNS0_3ASTESD_DnEEEPT_DpOT0_:
  980|  13.8k|    {
  981|  13.8k|        auto r = new T(std::forward<Args>(args)...);
  982|  13.8k|        allocated.push_back(r);
  983|  13.8k|        return r;
  984|  13.8k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_15DesugaredObjectEJRNS0_13LocationRangeERNSt3__14listIPNS0_3ASTENS6_9allocatorIS9_EEEERNS6_6vectorINS3_5FieldENSA_ISF_EEEEEEEPT_DpOT0_:
  980|   357k|    {
  981|   357k|        auto r = new T(std::forward<Args>(args)...);
  982|   357k|        allocated.push_back(r);
  983|   357k|        return r;
  984|   357k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|   880k|    {
  981|   880k|        auto r = new T(std::forward<Args>(args)...);
  982|   880k|        allocated.push_back(r);
  983|   880k|        return r;
  984|   880k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralNumberESE_DnSE_DnSE_EEEPT_DpOT0_:
  980|  29.5k|    {
  981|  29.5k|        auto r = new T(std::forward<Args>(args)...);
  982|  29.5k|        allocated.push_back(r);
  983|  29.5k|        return r;
  984|  29.5k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS7_12basic_stringIcNS7_11char_traitsIcEENSA_IcEEEEEEEPT_DpOT0_:
  980|  29.5k|    {
  981|  29.5k|        auto r = new T(std::forward<Args>(args)...);
  982|  29.5k|        allocated.push_back(r);
  983|  29.5k|        return r;
  984|  29.5k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_18ArrayComprehensionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ArrayESD_bRNS7_INS0_17ComprehensionSpecENS9_ISG_EEEESD_EEEPT_DpOT0_:
  980|  28.4k|    {
  981|  28.4k|        auto r = new T(std::forward<Args>(args)...);
  982|  28.4k|        allocated.push_back(r);
  983|  28.4k|        return r;
  984|  28.4k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  980|  28.4k|    {
  981|  28.4k|        auto r = new T(std::forward<Args>(args)...);
  982|  28.4k|        allocated.push_back(r);
  983|  28.4k|        return r;
  984|  28.4k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_25ObjectComprehensionSimpleEJRNS0_13LocationRangeEPNS0_5IndexEPNS0_5LocalERPKNS0_10IdentifierERPNS0_3ASTEEEEPT_DpOT0_:
  980|  28.4k|    {
  981|  28.4k|        auto r = new T(std::forward<Args>(args)...);
  982|  28.4k|        allocated.push_back(r);
  983|  28.4k|        return r;
  984|  28.4k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bRPNS0_3ASTESE_DnSE_DnSE_EEEPT_DpOT0_:
  980|  28.4k|    {
  981|  28.4k|        auto r = new T(std::forward<Args>(args)...);
  982|  28.4k|        allocated.push_back(r);
  983|  28.4k|        return r;
  984|  28.4k|    }
_ZN7jsonnet8internal9Allocator15makeBuiltinBodyIZNS0_9Desugarer9stdlibASTENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEUlvE_EEPKNS0_19BuiltinFunctionBodyERKNS0_13LocationRangeERKSA_OT_:
 1009|   262k|    {
 1010|   262k|        auto it = internedBuiltins.find(name);
 1011|   262k|        if (it != internedBuiltins.end()) {
  ------------------
  |  Branch (1011:13): [True: 120k, False: 141k]
  ------------------
 1012|   120k|            return it->second;
 1013|   120k|        }
 1014|   141k|        const Identifiers params = make_params();
 1015|   141k|        auto r = new BuiltinFunctionBody(loc, name, params);
 1016|   141k|        internedBuiltins[name] = r;
 1017|   141k|        return r;
 1018|   262k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_15BuiltinFunctionEJRKNS0_13LocationRangeERPKNS0_19BuiltinFunctionBodyEEEEPT_DpOT0_:
  980|   262k|    {
  981|   262k|        auto r = new T(std::forward<Args>(args)...);
  982|   262k|        allocated.push_back(r);
  983|   262k|        return r;
  984|   262k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISD_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  980|  3.37k|    {
  981|  3.37k|        auto r = new T(std::forward<Args>(args)...);
  982|  3.37k|        allocated.push_back(r);
  983|  3.37k|        return r;
  984|  3.37k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5ApplyERKSC_SF_SD_PNS0_3VarEEEEPT_DpOT0_:
  980|  3.37k|    {
  981|  3.37k|        auto r = new T(std::forward<Args>(args)...);
  982|  3.37k|        allocated.push_back(r);
  983|  3.37k|        return r;
  984|  3.37k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_RNS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  980|  3.37k|    {
  981|  3.37k|        auto r = new T(std::forward<Args>(args)...);
  982|  3.37k|        allocated.push_back(r);
  983|  3.37k|        return r;
  984|  3.37k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  6.74k|    {
  981|  6.74k|        auto r = new T(std::forward<Args>(args)...);
  982|  6.74k|        allocated.push_back(r);
  983|  6.74k|        return r;
  984|  6.74k|    }
formatter.cpp:_ZN7jsonnet8internal12_GLOBAL__N_120build_precedence_mapEv:
 1047|      2|{
 1048|      2|    std::map<BinaryOp, int> r;
 1049|       |
 1050|      2|    r[BOP_MULT] = 5;
 1051|      2|    r[BOP_DIV] = 5;
 1052|      2|    r[BOP_PERCENT] = 5;
 1053|       |
 1054|      2|    r[BOP_PLUS] = 6;
 1055|      2|    r[BOP_MINUS] = 6;
 1056|       |
 1057|      2|    r[BOP_SHIFT_L] = 7;
 1058|      2|    r[BOP_SHIFT_R] = 7;
 1059|       |
 1060|      2|    r[BOP_GREATER] = 8;
 1061|      2|    r[BOP_GREATER_EQ] = 8;
 1062|      2|    r[BOP_LESS] = 8;
 1063|      2|    r[BOP_LESS_EQ] = 8;
 1064|      2|    r[BOP_IN] = 8;
 1065|       |
 1066|      2|    r[BOP_MANIFEST_EQUAL] = 9;
 1067|      2|    r[BOP_MANIFEST_UNEQUAL] = 9;
 1068|       |
 1069|      2|    r[BOP_BITWISE_AND] = 10;
 1070|       |
 1071|      2|    r[BOP_BITWISE_XOR] = 11;
 1072|       |
 1073|      2|    r[BOP_BITWISE_OR] = 12;
 1074|       |
 1075|      2|    r[BOP_AND] = 13;
 1076|       |
 1077|      2|    r[BOP_OR] = 14;
 1078|       |
 1079|      2|    return r;
 1080|      2|}
formatter.cpp:_ZN7jsonnet8internal12_GLOBAL__N_115build_unary_mapEv:
 1083|      2|{
 1084|      2|    std::map<std::string, UnaryOp> r;
 1085|      2|    r["!"] = UOP_NOT;
 1086|      2|    r["~"] = UOP_BITWISE_NOT;
 1087|      2|    r["+"] = UOP_PLUS;
 1088|      2|    r["-"] = UOP_MINUS;
 1089|      2|    return r;
 1090|      2|}
formatter.cpp:_ZN7jsonnet8internal12_GLOBAL__N_116build_binary_mapEv:
 1093|      2|{
 1094|      2|    std::map<std::string, BinaryOp> r;
 1095|       |
 1096|      2|    r["*"] = BOP_MULT;
 1097|      2|    r["/"] = BOP_DIV;
 1098|      2|    r["%"] = BOP_PERCENT;
 1099|       |
 1100|      2|    r["+"] = BOP_PLUS;
 1101|      2|    r["-"] = BOP_MINUS;
 1102|       |
 1103|      2|    r["<<"] = BOP_SHIFT_L;
 1104|      2|    r[">>"] = BOP_SHIFT_R;
 1105|       |
 1106|      2|    r[">"] = BOP_GREATER;
 1107|      2|    r[">="] = BOP_GREATER_EQ;
 1108|      2|    r["<"] = BOP_LESS;
 1109|      2|    r["<="] = BOP_LESS_EQ;
 1110|      2|    r["in"] = BOP_IN;
 1111|       |
 1112|      2|    r["=="] = BOP_MANIFEST_EQUAL;
 1113|      2|    r["!="] = BOP_MANIFEST_UNEQUAL;
 1114|       |
 1115|      2|    r["&"] = BOP_BITWISE_AND;
 1116|      2|    r["^"] = BOP_BITWISE_XOR;
 1117|      2|    r["|"] = BOP_BITWISE_OR;
 1118|       |
 1119|      2|    r["&&"] = BOP_AND;
 1120|      2|    r["||"] = BOP_OR;
 1121|      2|    return r;
 1122|      2|}

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

_ZN7jsonnet8internal7FmtOptsC2Ev:
   37|  6.18k|        : stringStyle('s'),
   38|  6.18k|          commentStyle('s'),
   39|  6.18k|          indent(2),
   40|  6.18k|          maxBlankLines(2),
   41|  6.18k|          padArrays(false),
   42|  6.18k|          padObjects(true),
   43|  6.18k|          stripComments(false),
   44|  6.18k|          stripAllButComments(false),
   45|  6.18k|          stripEverything(false),
   46|  6.18k|          prettyFieldNames(true),
   47|  6.18k|          sortImports(true)
   48|  6.18k|    {
   49|  6.18k|    }

_ZN7jsonnet8internal26allowed_at_end_of_operatorEc:
  174|  4.49M|bool allowed_at_end_of_operator(char c) {
  175|  4.49M|    switch (c) {
  ------------------
  |  Branch (175:13): [True: 1.82M, False: 2.66M]
  ------------------
  176|  1.10M|        case '+':
  ------------------
  |  Branch (176:9): [True: 1.10M, False: 3.38M]
  ------------------
  177|  1.18M|        case '-':
  ------------------
  |  Branch (177:9): [True: 78.3k, False: 4.41M]
  ------------------
  178|  1.55M|        case '~':
  ------------------
  |  Branch (178:9): [True: 368k, False: 4.12M]
  ------------------
  179|  1.74M|        case '!':
  ------------------
  |  Branch (179:9): [True: 194k, False: 4.29M]
  ------------------
  180|  1.82M|        case '$': return false;
  ------------------
  |  Branch (180:9): [True: 72.7k, False: 4.41M]
  ------------------
  181|  4.49M|    }
  182|  2.66M|    return true;
  183|  4.49M|}
_ZN7jsonnet8internal20lex_get_keyword_kindERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  207|  37.6M|{
  208|  37.6M|    auto it = keywords.find(identifier);
  209|  37.6M|    if (it == keywords.end())
  ------------------
  |  Branch (209:9): [True: 27.5M, False: 10.1M]
  ------------------
  210|  27.5M|        return Token::IDENTIFIER;
  211|  10.1M|    return it->second;
  212|  37.6M|}
_ZN7jsonnet8internal10lex_numberERPKcRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKNS0_8LocationE:
  215|  3.84M|{
  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|       |    // * We support digit separators using the _ character for readability in
  224|       |    //   large numeric literals.
  225|       |
  226|  3.84M|    enum State {
  227|  3.84M|        BEGIN,
  228|  3.84M|        AFTER_ZERO,
  229|  3.84M|        AFTER_ONE_TO_NINE,
  230|  3.84M|        AFTER_INT_UNDERSCORE,
  231|  3.84M|        AFTER_DOT,
  232|  3.84M|        AFTER_DIGIT,
  233|  3.84M|        AFTER_FRAC_UNDERSCORE,
  234|  3.84M|        AFTER_E,
  235|  3.84M|        AFTER_EXP_SIGN,
  236|  3.84M|        AFTER_EXP_DIGIT,
  237|  3.84M|        AFTER_EXP_UNDERSCORE
  238|  3.84M|    } state;
  239|       |
  240|  3.84M|    std::string r;
  241|       |
  242|  3.84M|    state = BEGIN;
  243|  8.41M|    while (true) {
  ------------------
  |  Branch (243:12): [True: 8.41M, Folded]
  ------------------
  244|  8.41M|        switch (state) {
  ------------------
  |  Branch (244:17): [True: 8.41M, False: 0]
  ------------------
  245|  3.84M|            case BEGIN:
  ------------------
  |  Branch (245:13): [True: 3.84M, False: 4.57M]
  ------------------
  246|  3.84M|                switch (*c) {
  247|   888k|                    case '0': state = AFTER_ZERO; break;
  ------------------
  |  Branch (247:21): [True: 888k, False: 2.95M]
  ------------------
  248|       |
  249|  1.11M|                    case '1':
  ------------------
  |  Branch (249:21): [True: 1.11M, False: 2.72M]
  ------------------
  250|  1.34M|                    case '2':
  ------------------
  |  Branch (250:21): [True: 233k, False: 3.61M]
  ------------------
  251|  1.50M|                    case '3':
  ------------------
  |  Branch (251:21): [True: 158k, False: 3.68M]
  ------------------
  252|  1.68M|                    case '4':
  ------------------
  |  Branch (252:21): [True: 179k, False: 3.66M]
  ------------------
  253|  1.72M|                    case '5':
  ------------------
  |  Branch (253:21): [True: 35.6k, False: 3.80M]
  ------------------
  254|  1.90M|                    case '6':
  ------------------
  |  Branch (254:21): [True: 176k, False: 3.66M]
  ------------------
  255|  1.92M|                    case '7':
  ------------------
  |  Branch (255:21): [True: 22.1k, False: 3.82M]
  ------------------
  256|  2.53M|                    case '8':
  ------------------
  |  Branch (256:21): [True: 608k, False: 3.23M]
  ------------------
  257|  2.95M|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (257:21): [True: 424k, False: 3.41M]
  ------------------
  258|       |
  259|      0|                    default: throw StaticError(filename, begin, "couldn't lex number");
  ------------------
  |  Branch (259:21): [True: 0, False: 3.84M]
  ------------------
  260|  3.84M|                }
  261|  3.84M|                break;
  262|       |
  263|  3.84M|            case AFTER_ZERO:
  ------------------
  |  Branch (263:13): [True: 888k, False: 7.52M]
  ------------------
  264|   888k|                switch (*c) {
  265|  13.8k|                    case '.': state = AFTER_DOT; break;
  ------------------
  |  Branch (265:21): [True: 13.8k, False: 874k]
  ------------------
  266|       |
  267|    394|                    case 'e':
  ------------------
  |  Branch (267:21): [True: 394, False: 888k]
  ------------------
  268|    535|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (268:21): [True: 141, False: 888k]
  ------------------
  269|       |
  270|      1|                    case '_': {
  ------------------
  |  Branch (270:21): [True: 1, False: 888k]
  ------------------
  271|      1|                        std::stringstream ss;
  272|      1|                        ss << "couldn't lex number, _ not allowed after leading 0";
  273|      1|                        throw StaticError(filename, begin, ss.str());
  274|    394|                    }
  275|       |
  276|   874k|                    default: goto end;
  ------------------
  |  Branch (276:21): [True: 874k, False: 14.4k]
  ------------------
  277|   888k|                }
  278|  14.4k|                break;
  279|       |
  280|  3.48M|            case AFTER_ONE_TO_NINE:
  ------------------
  |  Branch (280:13): [True: 3.48M, False: 4.92M]
  ------------------
  281|  3.48M|                switch (*c) {
  282|  9.34k|                    case '.': state = AFTER_DOT; break;
  ------------------
  |  Branch (282:21): [True: 9.34k, False: 3.47M]
  ------------------
  283|       |
  284|    476|                    case 'e':
  ------------------
  |  Branch (284:21): [True: 476, False: 3.48M]
  ------------------
  285|  1.22k|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (285:21): [True: 745, False: 3.48M]
  ------------------
  286|       |
  287|   201k|                    case '0':
  ------------------
  |  Branch (287:21): [True: 201k, False: 3.28M]
  ------------------
  288|   216k|                    case '1':
  ------------------
  |  Branch (288:21): [True: 14.4k, False: 3.47M]
  ------------------
  289|   289k|                    case '2':
  ------------------
  |  Branch (289:21): [True: 72.7k, False: 3.41M]
  ------------------
  290|   317k|                    case '3':
  ------------------
  |  Branch (290:21): [True: 28.9k, False: 3.45M]
  ------------------
  291|   356k|                    case '4':
  ------------------
  |  Branch (291:21): [True: 38.2k, False: 3.44M]
  ------------------
  292|   421k|                    case '5':
  ------------------
  |  Branch (292:21): [True: 64.9k, False: 3.42M]
  ------------------
  293|   462k|                    case '6':
  ------------------
  |  Branch (293:21): [True: 41.1k, False: 3.44M]
  ------------------
  294|   486k|                    case '7':
  ------------------
  |  Branch (294:21): [True: 24.1k, False: 3.46M]
  ------------------
  295|   512k|                    case '8':
  ------------------
  |  Branch (295:21): [True: 26.2k, False: 3.46M]
  ------------------
  296|   531k|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (296:21): [True: 19.0k, False: 3.46M]
  ------------------
  297|       |
  298|     93|                    case '_': state = AFTER_INT_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (298:21): [True: 93, False: 3.48M]
  ------------------
  299|       |
  300|  2.94M|                    default: goto end;
  ------------------
  |  Branch (300:21): [True: 2.94M, False: 542k]
  ------------------
  301|  3.48M|                }
  302|   542k|                break;
  303|       |
  304|   542k|            case AFTER_INT_UNDERSCORE:
  ------------------
  |  Branch (304:13): [True: 93, False: 8.41M]
  ------------------
  305|     93|                switch (*c) {
  306|       |                    // The only valid transition from _ is to a digit.
  307|      0|                    case '0':
  ------------------
  |  Branch (307:21): [True: 0, False: 93]
  ------------------
  308|      1|                    case '1':
  ------------------
  |  Branch (308:21): [True: 1, False: 92]
  ------------------
  309|      1|                    case '2':
  ------------------
  |  Branch (309:21): [True: 0, False: 93]
  ------------------
  310|      1|                    case '3':
  ------------------
  |  Branch (310:21): [True: 0, False: 93]
  ------------------
  311|      1|                    case '4':
  ------------------
  |  Branch (311:21): [True: 0, False: 93]
  ------------------
  312|      1|                    case '5':
  ------------------
  |  Branch (312:21): [True: 0, False: 93]
  ------------------
  313|      1|                    case '6':
  ------------------
  |  Branch (313:21): [True: 0, False: 93]
  ------------------
  314|      1|                    case '7':
  ------------------
  |  Branch (314:21): [True: 0, False: 93]
  ------------------
  315|     88|                    case '8':
  ------------------
  |  Branch (315:21): [True: 87, False: 6]
  ------------------
  316|     88|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (316:21): [True: 0, False: 93]
  ------------------
  317|       |
  318|      5|                    default: {
  ------------------
  |  Branch (318:21): [True: 5, False: 88]
  ------------------
  319|      5|                        std::stringstream ss;
  320|      5|                        ss << "couldn't lex number, junk after _: " << *c;
  321|      5|                        throw StaticError(filename, begin, ss.str());
  322|     88|                    }
  323|     93|                }
  324|     88|                break;
  325|       |
  326|  23.2k|            case AFTER_DOT:
  ------------------
  |  Branch (326:13): [True: 23.2k, False: 8.39M]
  ------------------
  327|  23.2k|                switch (*c) {
  328|  1.11k|                    case '0':
  ------------------
  |  Branch (328:21): [True: 1.11k, False: 22.1k]
  ------------------
  329|  7.78k|                    case '1':
  ------------------
  |  Branch (329:21): [True: 6.67k, False: 16.5k]
  ------------------
  330|  8.61k|                    case '2':
  ------------------
  |  Branch (330:21): [True: 827, False: 22.4k]
  ------------------
  331|  9.02k|                    case '3':
  ------------------
  |  Branch (331:21): [True: 408, False: 22.8k]
  ------------------
  332|  9.64k|                    case '4':
  ------------------
  |  Branch (332:21): [True: 619, False: 22.6k]
  ------------------
  333|  22.2k|                    case '5':
  ------------------
  |  Branch (333:21): [True: 12.5k, False: 10.6k]
  ------------------
  334|  22.4k|                    case '6':
  ------------------
  |  Branch (334:21): [True: 257, False: 22.9k]
  ------------------
  335|  22.5k|                    case '7':
  ------------------
  |  Branch (335:21): [True: 33, False: 23.2k]
  ------------------
  336|  22.8k|                    case '8':
  ------------------
  |  Branch (336:21): [True: 389, False: 22.8k]
  ------------------
  337|  23.2k|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (337:21): [True: 338, False: 22.8k]
  ------------------
  338|       |
  339|      7|                    default: {
  ------------------
  |  Branch (339:21): [True: 7, False: 23.2k]
  ------------------
  340|      7|                        std::stringstream ss;
  341|      7|                        ss << "couldn't lex number, junk after decimal point: " << *c;
  342|      7|                        throw StaticError(filename, begin, ss.str());
  343|  22.8k|                    }
  344|  23.2k|                }
  345|  23.2k|                break;
  346|       |
  347|   157k|            case AFTER_DIGIT:
  ------------------
  |  Branch (347:13): [True: 157k, False: 8.25M]
  ------------------
  348|   157k|                switch (*c) {
  349|    606|                    case 'e':
  ------------------
  |  Branch (349:21): [True: 606, False: 156k]
  ------------------
  350|  1.12k|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (350:21): [True: 514, False: 156k]
  ------------------
  351|       |
  352|  14.8k|                    case '0':
  ------------------
  |  Branch (352:21): [True: 14.8k, False: 142k]
  ------------------
  353|  35.2k|                    case '1':
  ------------------
  |  Branch (353:21): [True: 20.3k, False: 136k]
  ------------------
  354|  43.2k|                    case '2':
  ------------------
  |  Branch (354:21): [True: 8.04k, False: 149k]
  ------------------
  355|  57.0k|                    case '3':
  ------------------
  |  Branch (355:21): [True: 13.7k, False: 143k]
  ------------------
  356|  64.7k|                    case '4':
  ------------------
  |  Branch (356:21): [True: 7.72k, False: 149k]
  ------------------
  357|  85.2k|                    case '5':
  ------------------
  |  Branch (357:21): [True: 20.4k, False: 136k]
  ------------------
  358|  98.4k|                    case '6':
  ------------------
  |  Branch (358:21): [True: 13.1k, False: 144k]
  ------------------
  359|   106k|                    case '7':
  ------------------
  |  Branch (359:21): [True: 7.65k, False: 149k]
  ------------------
  360|   114k|                    case '8':
  ------------------
  |  Branch (360:21): [True: 8.85k, False: 148k]
  ------------------
  361|   134k|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (361:21): [True: 19.1k, False: 138k]
  ------------------
  362|       |
  363|     47|                    case '_': state = AFTER_FRAC_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (363:21): [True: 47, False: 157k]
  ------------------
  364|       |
  365|  22.1k|                    default: goto end;
  ------------------
  |  Branch (365:21): [True: 22.1k, False: 135k]
  ------------------
  366|   157k|                }
  367|   135k|                break;
  368|       |
  369|   135k|            case AFTER_FRAC_UNDERSCORE:
  ------------------
  |  Branch (369:13): [True: 47, False: 8.41M]
  ------------------
  370|     47|                switch (*c) {
  371|       |                    // The only valid transition from _ is to a digit.
  372|      1|                    case '0':
  ------------------
  |  Branch (372:21): [True: 1, False: 46]
  ------------------
  373|      4|                    case '1':
  ------------------
  |  Branch (373:21): [True: 3, False: 44]
  ------------------
  374|      4|                    case '2':
  ------------------
  |  Branch (374:21): [True: 0, False: 47]
  ------------------
  375|      4|                    case '3':
  ------------------
  |  Branch (375:21): [True: 0, False: 47]
  ------------------
  376|      4|                    case '4':
  ------------------
  |  Branch (376:21): [True: 0, False: 47]
  ------------------
  377|      4|                    case '5':
  ------------------
  |  Branch (377:21): [True: 0, False: 47]
  ------------------
  378|      6|                    case '6':
  ------------------
  |  Branch (378:21): [True: 2, False: 45]
  ------------------
  379|      6|                    case '7':
  ------------------
  |  Branch (379:21): [True: 0, False: 47]
  ------------------
  380|     46|                    case '8':
  ------------------
  |  Branch (380:21): [True: 40, False: 7]
  ------------------
  381|     46|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (381:21): [True: 0, False: 47]
  ------------------
  382|       |
  383|      1|                    default: {
  ------------------
  |  Branch (383:21): [True: 1, False: 46]
  ------------------
  384|      1|                        std::stringstream ss;
  385|      1|                        ss << "couldn't lex number, junk after _: " << *c;
  386|      1|                        throw StaticError(filename, begin, ss.str());
  387|     46|                    }
  388|     47|                }
  389|     46|                break;
  390|       |
  391|  2.87k|            case AFTER_E:
  ------------------
  |  Branch (391:13): [True: 2.87k, False: 8.41M]
  ------------------
  392|  2.87k|                switch (*c) {
  393|    216|                    case '+':
  ------------------
  |  Branch (393:21): [True: 216, False: 2.66k]
  ------------------
  394|    894|                    case '-': state = AFTER_EXP_SIGN; break;
  ------------------
  |  Branch (394:21): [True: 678, False: 2.19k]
  ------------------
  395|       |
  396|  1.04k|                    case '0':
  ------------------
  |  Branch (396:21): [True: 1.04k, False: 1.82k]
  ------------------
  397|  1.16k|                    case '1':
  ------------------
  |  Branch (397:21): [True: 120, False: 2.75k]
  ------------------
  398|  1.31k|                    case '2':
  ------------------
  |  Branch (398:21): [True: 144, False: 2.73k]
  ------------------
  399|  1.32k|                    case '3':
  ------------------
  |  Branch (399:21): [True: 14, False: 2.86k]
  ------------------
  400|  1.35k|                    case '4':
  ------------------
  |  Branch (400:21): [True: 27, False: 2.84k]
  ------------------
  401|  1.42k|                    case '5':
  ------------------
  |  Branch (401:21): [True: 68, False: 2.80k]
  ------------------
  402|  1.56k|                    case '6':
  ------------------
  |  Branch (402:21): [True: 145, False: 2.73k]
  ------------------
  403|  1.59k|                    case '7':
  ------------------
  |  Branch (403:21): [True: 31, False: 2.84k]
  ------------------
  404|  1.71k|                    case '8':
  ------------------
  |  Branch (404:21): [True: 121, False: 2.75k]
  ------------------
  405|  1.95k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (405:21): [True: 239, False: 2.63k]
  ------------------
  406|       |
  407|     26|                    default: {
  ------------------
  |  Branch (407:21): [True: 26, False: 2.85k]
  ------------------
  408|     26|                        std::stringstream ss;
  409|     26|                        ss << "couldn't lex number, junk after 'E': " << *c;
  410|     26|                        throw StaticError(filename, begin, ss.str());
  411|  1.71k|                    }
  412|  2.87k|                }
  413|  2.85k|                break;
  414|       |
  415|  2.85k|            case AFTER_EXP_SIGN:
  ------------------
  |  Branch (415:13): [True: 894, False: 8.41M]
  ------------------
  416|    894|                switch (*c) {
  417|     15|                    case '0':
  ------------------
  |  Branch (417:21): [True: 15, False: 879]
  ------------------
  418|     76|                    case '1':
  ------------------
  |  Branch (418:21): [True: 61, False: 833]
  ------------------
  419|    470|                    case '2':
  ------------------
  |  Branch (419:21): [True: 394, False: 500]
  ------------------
  420|    735|                    case '3':
  ------------------
  |  Branch (420:21): [True: 265, False: 629]
  ------------------
  421|    868|                    case '4':
  ------------------
  |  Branch (421:21): [True: 133, False: 761]
  ------------------
  422|    876|                    case '5':
  ------------------
  |  Branch (422:21): [True: 8, False: 886]
  ------------------
  423|    877|                    case '6':
  ------------------
  |  Branch (423:21): [True: 1, False: 893]
  ------------------
  424|    877|                    case '7':
  ------------------
  |  Branch (424:21): [True: 0, False: 894]
  ------------------
  425|    889|                    case '8':
  ------------------
  |  Branch (425:21): [True: 12, False: 882]
  ------------------
  426|    892|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (426:21): [True: 3, False: 891]
  ------------------
  427|       |
  428|      2|                    default: {
  ------------------
  |  Branch (428:21): [True: 2, False: 892]
  ------------------
  429|      2|                        std::stringstream ss;
  430|      2|                        ss << "couldn't lex number, junk after exponent sign: " << *c;
  431|      2|                        throw StaticError(filename, begin, ss.str());
  432|    889|                    }
  433|    894|                }
  434|    892|                break;
  435|       |
  436|  10.3k|            case AFTER_EXP_DIGIT:
  ------------------
  |  Branch (436:13): [True: 10.3k, False: 8.40M]
  ------------------
  437|  10.3k|                switch (*c) {
  438|  1.14k|                    case '0':
  ------------------
  |  Branch (438:21): [True: 1.14k, False: 9.24k]
  ------------------
  439|  1.93k|                    case '1':
  ------------------
  |  Branch (439:21): [True: 787, False: 9.60k]
  ------------------
  440|  2.35k|                    case '2':
  ------------------
  |  Branch (440:21): [True: 420, False: 9.97k]
  ------------------
  441|  3.25k|                    case '3':
  ------------------
  |  Branch (441:21): [True: 898, False: 9.49k]
  ------------------
  442|  4.63k|                    case '4':
  ------------------
  |  Branch (442:21): [True: 1.38k, False: 9.01k]
  ------------------
  443|  5.20k|                    case '5':
  ------------------
  |  Branch (443:21): [True: 567, False: 9.82k]
  ------------------
  444|  5.59k|                    case '6':
  ------------------
  |  Branch (444:21): [True: 393, False: 10.0k]
  ------------------
  445|  6.07k|                    case '7':
  ------------------
  |  Branch (445:21): [True: 479, False: 9.91k]
  ------------------
  446|  6.96k|                    case '8':
  ------------------
  |  Branch (446:21): [True: 892, False: 9.50k]
  ------------------
  447|  7.37k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (447:21): [True: 408, False: 9.98k]
  ------------------
  448|       |
  449|    174|                    case '_': state = AFTER_EXP_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (449:21): [True: 174, False: 10.2k]
  ------------------
  450|       |
  451|  2.84k|                    default: goto end;
  ------------------
  |  Branch (451:21): [True: 2.84k, False: 7.54k]
  ------------------
  452|  10.3k|                }
  453|  7.37k|                break;
  454|       |
  455|  7.37k|            case AFTER_EXP_UNDERSCORE:
  ------------------
  |  Branch (455:13): [True: 174, False: 8.41M]
  ------------------
  456|    174|                switch (*c) {
  457|       |                    // The only valid transition from _ is to a digit.
  458|      0|                    case '0':
  ------------------
  |  Branch (458:21): [True: 0, False: 174]
  ------------------
  459|    136|                    case '1':
  ------------------
  |  Branch (459:21): [True: 136, False: 38]
  ------------------
  460|    136|                    case '2':
  ------------------
  |  Branch (460:21): [True: 0, False: 174]
  ------------------
  461|    136|                    case '3':
  ------------------
  |  Branch (461:21): [True: 0, False: 174]
  ------------------
  462|    151|                    case '4':
  ------------------
  |  Branch (462:21): [True: 15, False: 159]
  ------------------
  463|    151|                    case '5':
  ------------------
  |  Branch (463:21): [True: 0, False: 174]
  ------------------
  464|    151|                    case '6':
  ------------------
  |  Branch (464:21): [True: 0, False: 174]
  ------------------
  465|    151|                    case '7':
  ------------------
  |  Branch (465:21): [True: 0, False: 174]
  ------------------
  466|    170|                    case '8':
  ------------------
  |  Branch (466:21): [True: 19, False: 155]
  ------------------
  467|    170|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (467:21): [True: 0, False: 174]
  ------------------
  468|       |
  469|      4|                    default: {
  ------------------
  |  Branch (469:21): [True: 4, False: 170]
  ------------------
  470|      4|                        std::stringstream ss;
  471|      4|                        ss << "couldn't lex number, junk after _: " << *c;
  472|      4|                        throw StaticError(filename, begin, ss.str());
  473|    170|                    }
  474|    174|                }
  475|    170|                break;
  476|  8.41M|        }
  477|  4.57M|        r += *c;
  478|       |
  479|  4.57M|skip_char:
  480|  4.57M|        c++;
  481|  4.57M|    }
  482|  3.84M|end:
  483|  3.84M|    return r;
  484|  3.84M|}
_ZN7jsonnet8internal11jsonnet_lexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKc:
  521|  12.4k|{
  522|  12.4k|    unsigned long line_number = 1;
  523|  12.4k|    const char *line_start = input;
  524|       |
  525|  12.4k|    Tokens r;
  526|       |
  527|  12.4k|    const char *c = input;
  528|       |
  529|  12.4k|    Fodder fodder;
  530|  12.4k|    bool fresh_line = true;  // Are we tokenizing from the beginning of a new line?
  531|       |
  532|  88.9M|    while (*c != '\0') {
  ------------------
  |  Branch (532:12): [True: 88.9M, False: 5.62k]
  ------------------
  533|       |        // Used to ensure we have actually advanced the pointer by the end of the iteration.
  534|  88.9M|        const char *original_c = c;
  535|       |
  536|  88.9M|        Token::Kind kind;
  537|  88.9M|        std::string data;
  538|  88.9M|        std::string string_block_indent;
  539|  88.9M|        std::string string_block_term_indent;
  540|       |
  541|  88.9M|        unsigned new_lines, indent;
  542|  88.9M|        lex_ws(c, new_lines, indent, line_start, line_number);
  543|       |
  544|       |        // If it's the end of the file, discard final whitespace.
  545|  88.9M|        if (*c == '\0')
  ------------------
  |  Branch (545:13): [True: 6.36k, False: 88.9M]
  ------------------
  546|  6.36k|            break;
  547|       |
  548|  88.9M|        if (new_lines > 0) {
  ------------------
  |  Branch (548:13): [True: 9.43M, False: 79.5M]
  ------------------
  549|       |            // Otherwise store whitespace in fodder.
  550|  9.43M|            unsigned blanks = new_lines - 1;
  551|  9.43M|            fodder.emplace_back(FodderElement::LINE_END, blanks, indent, EMPTY);
  552|  9.43M|            fresh_line = true;
  553|  9.43M|        }
  554|       |
  555|  88.9M|        Location begin(line_number, c - line_start + 1);
  556|       |
  557|  88.9M|        switch (*c) {
  558|       |            // The following operators should never be combined with subsequent symbols.
  559|   401k|            case '{':
  ------------------
  |  Branch (559:13): [True: 401k, False: 88.5M]
  ------------------
  560|   401k|                kind = Token::BRACE_L;
  561|   401k|                c++;
  562|   401k|                break;
  563|       |
  564|   392k|            case '}':
  ------------------
  |  Branch (564:13): [True: 392k, False: 88.5M]
  ------------------
  565|   392k|                kind = Token::BRACE_R;
  566|   392k|                c++;
  567|   392k|                break;
  568|       |
  569|  2.02M|            case '[':
  ------------------
  |  Branch (569:13): [True: 2.02M, False: 86.9M]
  ------------------
  570|  2.02M|                kind = Token::BRACKET_L;
  571|  2.02M|                c++;
  572|  2.02M|                break;
  573|       |
  574|  2.01M|            case ']':
  ------------------
  |  Branch (574:13): [True: 2.01M, False: 86.9M]
  ------------------
  575|  2.01M|                kind = Token::BRACKET_R;
  576|  2.01M|                c++;
  577|  2.01M|                break;
  578|       |
  579|  7.70M|            case ',':
  ------------------
  |  Branch (579:13): [True: 7.70M, False: 81.2M]
  ------------------
  580|  7.70M|                kind = Token::COMMA;
  581|  7.70M|                c++;
  582|  7.70M|                break;
  583|       |
  584|  4.49M|            case '.':
  ------------------
  |  Branch (584:13): [True: 4.49M, False: 84.4M]
  ------------------
  585|  4.49M|                kind = Token::DOT;
  586|  4.49M|                c++;
  587|  4.49M|                break;
  588|       |
  589|  6.76M|            case '(':
  ------------------
  |  Branch (589:13): [True: 6.76M, False: 82.1M]
  ------------------
  590|  6.76M|                kind = Token::PAREN_L;
  591|  6.76M|                c++;
  592|  6.76M|                break;
  593|       |
  594|  6.75M|            case ')':
  ------------------
  |  Branch (594:13): [True: 6.75M, False: 82.1M]
  ------------------
  595|  6.75M|                kind = Token::PAREN_R;
  596|  6.75M|                c++;
  597|  6.75M|                break;
  598|       |
  599|  1.76M|            case ';':
  ------------------
  |  Branch (599:13): [True: 1.76M, False: 87.1M]
  ------------------
  600|  1.76M|                kind = Token::SEMICOLON;
  601|  1.76M|                c++;
  602|  1.76M|                break;
  603|       |
  604|       |            // Numeric literals.
  605|   888k|            case '0':
  ------------------
  |  Branch (605:13): [True: 888k, False: 88.0M]
  ------------------
  606|  2.00M|            case '1':
  ------------------
  |  Branch (606:13): [True: 1.11M, False: 87.8M]
  ------------------
  607|  2.23M|            case '2':
  ------------------
  |  Branch (607:13): [True: 233k, False: 88.7M]
  ------------------
  608|  2.39M|            case '3':
  ------------------
  |  Branch (608:13): [True: 158k, False: 88.7M]
  ------------------
  609|  2.57M|            case '4':
  ------------------
  |  Branch (609:13): [True: 179k, False: 88.7M]
  ------------------
  610|  2.61M|            case '5':
  ------------------
  |  Branch (610:13): [True: 35.6k, False: 88.9M]
  ------------------
  611|  2.78M|            case '6':
  ------------------
  |  Branch (611:13): [True: 176k, False: 88.7M]
  ------------------
  612|  2.81M|            case '7':
  ------------------
  |  Branch (612:13): [True: 22.1k, False: 88.9M]
  ------------------
  613|  3.41M|            case '8':
  ------------------
  |  Branch (613:13): [True: 608k, False: 88.3M]
  ------------------
  614|  3.84M|            case '9':
  ------------------
  |  Branch (614:13): [True: 424k, False: 88.5M]
  ------------------
  615|  3.84M|                kind = Token::NUMBER;
  616|  3.84M|                data = lex_number(c, filename, begin);
  617|  3.84M|                break;
  618|       |
  619|       |            // UString literals.
  620|   157k|            case '"': {
  ------------------
  |  Branch (620:13): [True: 157k, False: 88.7M]
  ------------------
  621|   157k|                c++;
  622|  33.3M|                for (;; ++c) {
  623|  33.3M|                    if (*c == '\0') {
  ------------------
  |  Branch (623:25): [True: 22, False: 33.3M]
  ------------------
  624|     22|                        throw StaticError(filename, begin, "unterminated string");
  625|     22|                    }
  626|  33.3M|                    if (*c == '"') {
  ------------------
  |  Branch (626:25): [True: 157k, False: 33.2M]
  ------------------
  627|   157k|                        break;
  628|   157k|                    }
  629|  33.2M|                    if (*c == '\\' && *(c + 1) != '\0') {
  ------------------
  |  Branch (629:25): [True: 54.3k, False: 33.1M]
  |  Branch (629:39): [True: 54.3k, False: 1]
  ------------------
  630|  54.3k|                        data += *c;
  631|  54.3k|                        ++c;
  632|  54.3k|                    }
  633|  33.2M|                    if (*c == '\n') {
  ------------------
  |  Branch (633:25): [True: 1.44M, False: 31.7M]
  ------------------
  634|       |                        // Maintain line/column counters.
  635|  1.44M|                        line_number++;
  636|  1.44M|                        line_start = c + 1;
  637|  1.44M|                    }
  638|  33.2M|                    data += *c;
  639|  33.2M|                }
  640|   157k|                c++;  // Advance beyond the ".
  641|   157k|                kind = Token::STRING_DOUBLE;
  642|   157k|            } break;
  643|       |
  644|       |            // UString literals.
  645|  2.93M|            case '\'': {
  ------------------
  |  Branch (645:13): [True: 2.93M, False: 86.0M]
  ------------------
  646|  2.93M|                c++;
  647|  42.3M|                for (;; ++c) {
  648|  42.3M|                    if (*c == '\0') {
  ------------------
  |  Branch (648:25): [True: 20, False: 42.3M]
  ------------------
  649|     20|                        throw StaticError(filename, begin, "unterminated string");
  650|     20|                    }
  651|  42.3M|                    if (*c == '\'') {
  ------------------
  |  Branch (651:25): [True: 2.93M, False: 39.3M]
  ------------------
  652|  2.93M|                        break;
  653|  2.93M|                    }
  654|  39.3M|                    if (*c == '\\' && *(c + 1) != '\0') {
  ------------------
  |  Branch (654:25): [True: 332k, False: 39.0M]
  |  Branch (654:39): [True: 332k, False: 1]
  ------------------
  655|   332k|                        data += *c;
  656|   332k|                        ++c;
  657|   332k|                    }
  658|  39.3M|                    if (*c == '\n') {
  ------------------
  |  Branch (658:25): [True: 100k, False: 39.2M]
  ------------------
  659|       |                        // Maintain line/column counters.
  660|   100k|                        line_number++;
  661|   100k|                        line_start = c + 1;
  662|   100k|                    }
  663|  39.3M|                    data += *c;
  664|  39.3M|                }
  665|  2.93M|                c++;  // Advance beyond the '.
  666|  2.93M|                kind = Token::STRING_SINGLE;
  667|  2.93M|            } break;
  668|       |
  669|       |            // Verbatim string literals.
  670|       |            // ' and " quoting is interpreted here, unlike non-verbatim strings
  671|       |            // where it is done later by jsonnet_string_unescape.  This is OK
  672|       |            // in this case because no information is lost by resoving the
  673|       |            // repeated quote into a single quote, so we can go back to the
  674|       |            // original form in the formatter.
  675|  2.22k|            case '@': {
  ------------------
  |  Branch (675:13): [True: 2.22k, False: 88.9M]
  ------------------
  676|  2.22k|                c++;
  677|  2.22k|                if (*c != '"' && *c != '\'') {
  ------------------
  |  Branch (677:21): [True: 839, False: 1.38k]
  |  Branch (677:34): [True: 12, False: 827]
  ------------------
  678|     12|                    std::stringstream ss;
  679|     12|                    ss << "couldn't lex verbatim string, junk after '@': " << *c;
  680|     12|                    throw StaticError(filename, begin, ss.str());
  681|     12|                }
  682|  2.21k|                const char quot = *c;
  683|  2.21k|                c++;  // Advance beyond the opening quote.
  684|  14.8k|                for (;; ++c) {
  685|  14.8k|                    if (*c == '\0') {
  ------------------
  |  Branch (685:25): [True: 19, False: 14.7k]
  ------------------
  686|     19|                        throw StaticError(filename, begin, "unterminated verbatim string");
  687|     19|                    }
  688|  14.7k|                    if (*c == quot) {
  ------------------
  |  Branch (688:25): [True: 2.36k, False: 12.4k]
  ------------------
  689|  2.36k|                        if (*(c + 1) == quot) {
  ------------------
  |  Branch (689:29): [True: 173, False: 2.19k]
  ------------------
  690|    173|                            c++;
  691|  2.19k|                        } else {
  692|  2.19k|                            break;
  693|  2.19k|                        }
  694|  2.36k|                    }
  695|  12.6k|                    data += *c;
  696|  12.6k|                }
  697|  2.19k|                c++;  // Advance beyond the closing quote.
  698|  2.19k|                if (quot == '"') {
  ------------------
  |  Branch (698:21): [True: 1.37k, False: 815]
  ------------------
  699|  1.37k|                    kind = Token::VERBATIM_STRING_DOUBLE;
  700|  1.37k|                } else {
  701|    815|                    kind = Token::VERBATIM_STRING_SINGLE;
  702|    815|                }
  703|  2.19k|            } break;
  704|       |
  705|       |            // Keywords
  706|  49.6M|            default:
  ------------------
  |  Branch (706:13): [True: 49.6M, False: 39.2M]
  ------------------
  707|  49.6M|                if (is_identifier_first(*c)) {
  ------------------
  |  Branch (707:21): [True: 37.6M, False: 12.0M]
  ------------------
  708|  37.6M|                    std::string id;
  709|   205M|                    for (; is_identifier(*c); ++c)
  ------------------
  |  Branch (709:28): [True: 167M, False: 37.6M]
  ------------------
  710|   167M|                        id += *c;
  711|  37.6M|                    kind = lex_get_keyword_kind(id);
  712|  37.6M|                    data = id;
  713|       |
  714|  37.6M|                } else if (is_symbol(*c) || *c == '#') {
  ------------------
  |  Branch (714:28): [True: 10.2M, False: 1.74M]
  |  Branch (714:45): [True: 1.74M, False: 89]
  ------------------
  715|       |                    // Single line C++ and Python style comments.
  716|  12.0M|                    if (*c == '#' || (*c == '/' && *(c + 1) == '/')) {
  ------------------
  |  Branch (716:25): [True: 1.74M, False: 10.2M]
  |  Branch (716:39): [True: 751k, False: 9.54M]
  |  Branch (716:52): [True: 581k, False: 169k]
  ------------------
  717|  2.32M|                        std::vector<std::string> comment(1);
  718|  2.32M|                        unsigned blanks;
  719|  2.32M|                        unsigned indent;
  720|  2.32M|                        lex_until_newline(c, comment[0], blanks, indent, line_start, line_number);
  721|  2.32M|                        auto kind = fresh_line ? FodderElement::PARAGRAPH : FodderElement::LINE_END;
  ------------------
  |  Branch (721:37): [True: 2.31M, False: 10.1k]
  ------------------
  722|  2.32M|                        fodder.emplace_back(kind, blanks, indent, comment);
  723|  2.32M|                        fresh_line = true;
  724|  2.32M|                        continue;  // We've not got a token, just fodder, so keep scanning.
  725|  2.32M|                    }
  726|       |
  727|       |                    // Multi-line C style comment.
  728|  9.71M|                    if (*c == '/' && *(c + 1) == '*') {
  ------------------
  |  Branch (728:25): [True: 169k, False: 9.54M]
  |  Branch (728:38): [True: 85.0k, False: 84.6k]
  ------------------
  729|  85.0k|                        unsigned margin = c - line_start;
  730|       |
  731|  85.0k|                        const char *initial_c = c;
  732|  85.0k|                        c += 2;  // Avoid matching /*/: skip the /* before starting the search for
  733|       |                                 // */.
  734|       |
  735|  41.5M|                        while (!(*c == '*' && *(c + 1) == '/')) {
  ------------------
  |  Branch (735:34): [True: 166k, False: 41.3M]
  |  Branch (735:47): [True: 85.0k, False: 81.7k]
  ------------------
  736|  41.4M|                            if (*c == '\0') {
  ------------------
  |  Branch (736:33): [True: 53, False: 41.4M]
  ------------------
  737|     53|                                auto msg = "multi-line comment has no terminating */.";
  738|     53|                                throw StaticError(filename, begin, msg);
  739|     53|                            }
  740|  41.4M|                            if (*c == '\n') {
  ------------------
  |  Branch (740:33): [True: 5.72M, False: 35.7M]
  ------------------
  741|       |                                // Just keep track of the line / column counters.
  742|  5.72M|                                line_number++;
  743|  5.72M|                                line_start = c + 1;
  744|  5.72M|                            }
  745|  41.4M|                            ++c;
  746|  41.4M|                        }
  747|  85.0k|                        c += 2;  // Move the pointer to the char after the closing '/'.
  748|       |
  749|  85.0k|                        std::string comment(initial_c,
  750|  85.0k|                                            c - initial_c);  // Includes the "/*" and "*/".
  751|       |
  752|       |                        // Lex whitespace after comment
  753|  85.0k|                        unsigned new_lines_after, indent_after;
  754|  85.0k|                        lex_ws(c, new_lines_after, indent_after, line_start, line_number);
  755|  85.0k|                        std::vector<std::string> lines;
  756|  85.0k|                        if (comment.find('\n') >= comment.length()) {
  ------------------
  |  Branch (756:29): [True: 17.5k, False: 67.4k]
  ------------------
  757|       |                            // Comment looks like /* foo */
  758|  17.5k|                            lines.push_back(comment);
  759|  17.5k|                            fodder.emplace_back(FodderElement::INTERSTITIAL, 0, 0, lines);
  760|  17.5k|                            if (new_lines_after > 0) {
  ------------------
  |  Branch (760:33): [True: 13.9k, False: 3.59k]
  ------------------
  761|  13.9k|                                fodder.emplace_back(FodderElement::LINE_END,
  762|  13.9k|                                                    new_lines_after - 1,
  763|  13.9k|                                                    indent_after,
  764|  13.9k|                                                    EMPTY);
  765|  13.9k|                                fresh_line = true;
  766|  13.9k|                            }
  767|  67.4k|                        } else {
  768|  67.4k|                            lines = line_split(comment, margin);
  769|  67.4k|                            assert(lines[0][0] == '/');
  ------------------
  |  Branch (769:29): [True: 67.4k, False: 0]
  ------------------
  770|       |                            // Little hack to support PARAGRAPHs with * down the LHS:
  771|       |                            // Add a space to lines that start with a '*'
  772|  67.4k|                            bool all_star = true;
  773|  5.78M|                            for (auto &l : lines) {
  ------------------
  |  Branch (773:42): [True: 5.78M, False: 67.4k]
  ------------------
  774|  5.78M|                                if (l[0] != '*')
  ------------------
  |  Branch (774:37): [True: 5.72M, False: 67.0k]
  ------------------
  775|  5.72M|                                    all_star = false;
  776|  5.78M|                            }
  777|  67.4k|                            if (all_star) {
  ------------------
  |  Branch (777:33): [True: 0, False: 67.4k]
  ------------------
  778|      0|                                for (auto &l : lines) {
  ------------------
  |  Branch (778:46): [True: 0, False: 0]
  ------------------
  779|      0|                                    if (l[0] == '*')
  ------------------
  |  Branch (779:41): [True: 0, False: 0]
  ------------------
  780|      0|                                        l = " " + l;
  781|      0|                                }
  782|      0|                            }
  783|  67.4k|                            if (new_lines_after == 0) {
  ------------------
  |  Branch (783:33): [True: 11.1k, False: 56.3k]
  ------------------
  784|       |                                // Ensure a line end after the paragraph.
  785|  11.1k|                                new_lines_after = 1;
  786|  11.1k|                                indent_after = 0;
  787|  11.1k|                            }
  788|  67.4k|                            fodder_push_back(fodder,
  789|  67.4k|                                             FodderElement(FodderElement::PARAGRAPH,
  790|  67.4k|                                                           new_lines_after - 1,
  791|  67.4k|                                                           indent_after,
  792|  67.4k|                                                           lines));
  793|  67.4k|                            fresh_line = true;
  794|  67.4k|                        }
  795|  85.0k|                        continue;  // We've not got a token, just fodder, so keep scanning.
  796|  85.0k|                    }
  797|       |
  798|       |                    // Text block
  799|  9.62M|                    if (*c == '|' && *(c + 1) == '|' && *(c + 2) == '|') {
  ------------------
  |  Branch (799:25): [True: 184k, False: 9.44M]
  |  Branch (799:38): [True: 138k, False: 46.4k]
  |  Branch (799:57): [True: 5.10k, False: 133k]
  ------------------
  800|  5.10k|                        c += 3;  // Skip the "|||".
  801|       |
  802|  5.10k|                        bool chomp_trailing_nl = false;
  803|  5.10k|                        if (*c == '-') {
  ------------------
  |  Branch (803:29): [True: 160, False: 4.94k]
  ------------------
  804|    160|                            chomp_trailing_nl = true;
  805|    160|                            c++;
  806|    160|                        }
  807|       |
  808|  6.69k|                        while (is_horz_ws(*c)) ++c;  // Chomp whitespace at end of line.
  ------------------
  |  Branch (808:32): [True: 1.59k, False: 5.10k]
  ------------------
  809|  5.10k|                        if (*c != '\n') {
  ------------------
  |  Branch (809:29): [True: 38, False: 5.06k]
  ------------------
  810|     38|                            auto msg = "text block syntax requires new line after |||.";
  811|     38|                            throw StaticError(filename, begin, msg);
  812|     38|                        }
  813|  5.06k|                        std::stringstream block;
  814|  5.06k|                        c++;  // Skip the "\n"
  815|  5.06k|                        line_number++;
  816|       |                        // Skip any blank lines at the beginning of the block.
  817|  7.01k|                        while (*c == '\n') {
  ------------------
  |  Branch (817:32): [True: 1.94k, False: 5.06k]
  ------------------
  818|  1.94k|                            line_number++;
  819|  1.94k|                            ++c;
  820|  1.94k|                            block << '\n';
  821|  1.94k|                        }
  822|  5.06k|                        line_start = c;
  823|  5.06k|                        const char *first_line = c;
  824|  5.06k|                        int ws_chars = whitespace_check(first_line, c);
  825|  5.06k|                        string_block_indent = std::string(first_line, ws_chars);
  826|  5.06k|                        if (ws_chars == 0) {
  ------------------
  |  Branch (826:29): [True: 17, False: 5.04k]
  ------------------
  827|     17|                            auto msg = "text block's first line must start with whitespace.";
  828|     17|                            throw StaticError(filename, begin, msg);
  829|     17|                        }
  830|  6.79k|                        while (true) {
  ------------------
  |  Branch (830:32): [True: 6.79k, Folded]
  ------------------
  831|  6.79k|                            assert(ws_chars > 0);
  ------------------
  |  Branch (831:29): [True: 6.79k, False: 0]
  ------------------
  832|       |                            // Read up to the \n
  833|   270k|                            for (c = &c[ws_chars]; *c != '\n'; ++c) {
  ------------------
  |  Branch (833:52): [True: 264k, False: 6.74k]
  ------------------
  834|   264k|                                if (*c == '\0')
  ------------------
  |  Branch (834:37): [True: 55, False: 264k]
  ------------------
  835|     55|                                    throw StaticError(filename, begin, "unexpected EOF");
  836|   264k|                                block << *c;
  837|   264k|                            }
  838|       |                            // Add the \n
  839|  6.74k|                            block << '\n';
  840|  6.74k|                            ++c;
  841|  6.74k|                            line_number++;
  842|  6.74k|                            line_start = c;
  843|       |                            // Skip any blank lines
  844|  7.59k|                            while (*c == '\n') {
  ------------------
  |  Branch (844:36): [True: 847, False: 6.74k]
  ------------------
  845|    847|                                line_number++;
  846|    847|                                ++c;
  847|    847|                                block << '\n';
  848|    847|                            }
  849|       |                            // Examine next line
  850|  6.74k|                            ws_chars = whitespace_check(first_line, c);
  851|  6.74k|                            if (ws_chars == 0) {
  ------------------
  |  Branch (851:33): [True: 4.99k, False: 1.74k]
  ------------------
  852|       |                                // End of text block (or indentation error).
  853|       |                                // Count actual whitespace on this line.
  854|  4.99k|                                int actual_ws = 0;
  855|  69.3k|                                while (c[actual_ws] == ' ' ||
  ------------------
  |  Branch (855:40): [True: 64.0k, False: 5.36k]
  ------------------
  856|  64.3k|                                       c[actual_ws] == '\t') {
  ------------------
  |  Branch (856:40): [True: 373, False: 4.99k]
  ------------------
  857|  64.3k|                                    actual_ws++;
  858|  64.3k|                                }
  859|       |
  860|       |                                // Check if this is the terminator |||
  861|  4.99k|                                bool is_terminator = (
  862|  4.99k|                                    c[actual_ws] == '|' &&
  ------------------
  |  Branch (862:37): [True: 4.93k, False: 63]
  ------------------
  863|  4.93k|                                    c[actual_ws + 1] == '|' &&
  ------------------
  |  Branch (863:37): [True: 4.92k, False: 6]
  ------------------
  864|  4.92k|                                    c[actual_ws + 2] == '|');
  ------------------
  |  Branch (864:37): [True: 4.91k, False: 8]
  ------------------
  865|       |
  866|  4.99k|                                if (!is_terminator) {
  ------------------
  |  Branch (866:37): [True: 77, False: 4.91k]
  ------------------
  867|       |                                    // Not a terminator - check if it's an
  868|       |                                    // indentation issue.
  869|     77|                                    if (actual_ws > 0) {
  ------------------
  |  Branch (869:41): [True: 37, False: 40]
  ------------------
  870|       |                                        // Has whitespace but doesn't match expected
  871|       |                                        // indentation.
  872|     37|                                        std::stringstream msg;
  873|     37|                                        msg << "text block indentation mismatch: "
  874|     37|                                                "expected at least ";
  875|     37|                                        describe_whitespace(msg, string_block_indent);
  876|     37|                                        msg << ", found ";
  877|     37|                                        describe_whitespace(msg, std::string(c, actual_ws));
  878|     37|                                        throw StaticError(filename, begin, msg.str());
  879|     40|                                    } else {
  880|       |                                        // No whitespace and no ||| - missing
  881|       |                                        // terminator.
  882|     40|                                        auto msg =
  883|     40|                                            "text block not terminated with |||";
  884|     40|                                        throw StaticError(filename, begin, msg);
  885|     40|                                    }
  886|     77|                                }
  887|       |
  888|       |                                // Valid termination - skip over any whitespace.
  889|  68.6k|                                while (*c == ' ' || *c == '\t') {
  ------------------
  |  Branch (889:40): [True: 63.7k, False: 4.93k]
  |  Branch (889:53): [True: 14, False: 4.91k]
  ------------------
  890|  63.7k|                                    string_block_term_indent += *c;
  891|  63.7k|                                    ++c;
  892|  63.7k|                                }
  893|       |                                // Skip the |||
  894|  4.91k|                                c += 3;  // Leave after the last |
  895|  4.91k|                                data = block.str();
  896|  4.91k|                                kind = Token::STRING_BLOCK;
  897|  4.91k|                                if (chomp_trailing_nl) {
  ------------------
  |  Branch (897:37): [True: 152, False: 4.76k]
  ------------------
  898|    152|                                    assert(data.back() == '\n');
  ------------------
  |  Branch (898:37): [True: 152, False: 0]
  ------------------
  899|    152|                                    data.pop_back();
  900|    152|                                }
  901|  4.91k|                                break;  // Out of the while loop.
  902|  4.91k|                            }
  903|  6.74k|                        }
  904|       |
  905|  4.91k|                        break;  // Out of the switch.
  906|  5.04k|                    }
  907|       |
  908|  9.62M|                    const char *operator_begin = c;
  909|  33.3M|                    for (; is_symbol(*c); ++c) {
  ------------------
  |  Branch (909:28): [True: 23.6M, False: 9.62M]
  ------------------
  910|       |                        // Not allowed // in operators
  911|  23.6M|                        if (*c == '/' && *(c + 1) == '/')
  ------------------
  |  Branch (911:29): [True: 85.5k, False: 23.6M]
  |  Branch (911:42): [True: 373, False: 85.2k]
  ------------------
  912|    373|                            break;
  913|       |                        // Not allowed /* in operators
  914|  23.6M|                        if (*c == '/' && *(c + 1) == '*')
  ------------------
  |  Branch (914:29): [True: 85.2k, False: 23.6M]
  |  Branch (914:42): [True: 290, False: 84.9k]
  ------------------
  915|    290|                            break;
  916|       |                        // Not allowed ||| in operators
  917|  23.6M|                        if (*c == '|' && *(c + 1) == '|' && *(c + 2) == '|')
  ------------------
  |  Branch (917:29): [True: 313k, False: 23.3M]
  |  Branch (917:42): [True: 133k, False: 179k]
  |  Branch (917:61): [True: 639, False: 133k]
  ------------------
  918|    639|                            break;
  919|  23.6M|                    }
  920|       |                    // Not allowed to end with a + - ~ ! unless a single char.
  921|       |                    // So, wind it back if we need to (but not too far).
  922|  11.4M|                    while (c > operator_begin + 1 && !allowed_at_end_of_operator(*(c - 1))) {
  ------------------
  |  Branch (922:28): [True: 4.49M, False: 6.95M]
  |  Branch (922:54): [True: 1.82M, False: 2.66M]
  ------------------
  923|  1.82M|                        c--;
  924|  1.82M|                    }
  925|  9.62M|                    data += std::string(operator_begin, c);
  926|  9.62M|                    if (data == "$") {
  ------------------
  |  Branch (926:25): [True: 34.4k, False: 9.58M]
  ------------------
  927|  34.4k|                        kind = Token::DOLLAR;
  928|  34.4k|                        data = "";
  929|  9.58M|                    } else {
  930|  9.58M|                        kind = Token::OPERATOR;
  931|  9.58M|                    }
  932|  9.62M|                } else {
  933|     89|                    std::stringstream ss;
  934|     89|                    ss << "Could not lex the character ";
  935|     89|                    auto uc = (unsigned char)(*c);
  936|     89|                    if (*c < 32)
  ------------------
  |  Branch (936:25): [True: 81, False: 8]
  ------------------
  937|     81|                        ss << "code " << unsigned(uc);
  938|      8|                    else
  939|      8|                        ss << "'" << *c << "'";
  940|     89|                    throw StaticError(filename, begin, ss.str());
  941|     89|                }
  942|  88.9M|        }
  943|       |
  944|       |        // Ensure that a bug in the above code does not cause an infinite memory consuming loop due
  945|       |        // to pushing empty tokens.
  946|  86.5M|        if (c == original_c) {
  ------------------
  |  Branch (946:13): [True: 0, False: 86.5M]
  ------------------
  947|      0|            throw StaticError(filename, begin, "internal lexing error:  pointer did not advance");
  948|      0|        }
  949|       |
  950|  86.5M|        Location end(line_number, (c + 1) - line_start);
  951|  86.5M|        r.emplace_back(kind,
  952|  86.5M|                       fodder,
  953|  86.5M|                       data,
  954|  86.5M|                       string_block_indent,
  955|  86.5M|                       string_block_term_indent,
  956|  86.5M|                       LocationRange(filename, begin, end));
  957|  86.5M|        fodder.clear();
  958|  86.5M|        fresh_line = false;
  959|  86.5M|    }
  960|       |
  961|  11.9k|    Location begin(line_number, c - line_start + 1);
  962|  11.9k|    Location end(line_number, (c + 1) - line_start + 1);
  963|  11.9k|    r.emplace_back(Token::END_OF_FILE, fodder, "", "", "", LocationRange(filename, begin, end));
  964|  11.9k|    return r;
  965|  12.4k|}
lexer.cpp:_ZN7jsonnet8internalL6lex_wsERPKcRjS4_S3_Rm:
   81|  91.3M|{
   82|  91.3M|    indent = 0;
   83|  91.3M|    new_lines = 0;
   84|   211M|    for (; *c != '\0' && is_ws(*c); c++) {
  ------------------
  |  Branch (84:12): [True: 211M, False: 6.77k]
  |  Branch (84:26): [True: 119M, False: 91.3M]
  ------------------
   85|   119M|        switch (*c) {
  ------------------
  |  Branch (85:17): [True: 119M, False: 0]
  ------------------
   86|   531k|            case '\r':
  ------------------
  |  Branch (86:13): [True: 531k, False: 119M]
  ------------------
   87|       |                // Ignore.
   88|   531k|                break;
   89|       |
   90|  12.9M|            case '\n':
  ------------------
  |  Branch (90:13): [True: 12.9M, False: 107M]
  ------------------
   91|  12.9M|                indent = 0;
   92|  12.9M|                new_lines++;
   93|  12.9M|                line_number++;
   94|  12.9M|                line_start = c + 1;
   95|  12.9M|                break;
   96|       |
   97|   106M|            case ' ': indent += 1; break;
  ------------------
  |  Branch (97:13): [True: 106M, False: 13.5M]
  ------------------
   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|  34.7k|            case '\t': indent += 8; break;
  ------------------
  |  Branch (103:13): [True: 34.7k, False: 119M]
  ------------------
  104|   119M|        }
  105|   119M|    }
  106|  91.3M|}
lexer.cpp:_ZN7jsonnet8internalL5is_wsEc:
   39|   211M|{
   40|   211M|    return c == '\n' || is_horz_ws(c);
  ------------------
  |  Branch (40:12): [True: 12.9M, False: 198M]
  |  Branch (40:25): [True: 107M, False: 91.3M]
  ------------------
   41|   211M|}
lexer.cpp:_ZN7jsonnet8internalL19is_identifier_firstEc:
  143|   255M|{
  144|   255M|    return is_upper(c) || is_lower(c) || c == '_';
  ------------------
  |  Branch (144:12): [True: 3.76M, False: 251M]
  |  Branch (144:27): [True: 188M, False: 62.5M]
  |  Branch (144:42): [True: 2.73M, False: 59.7M]
  ------------------
  145|   255M|}
lexer.cpp:_ZN7jsonnet8internalL8is_upperEc:
  128|   255M|{
  129|   255M|    return c >= 'A' && c <= 'Z';
  ------------------
  |  Branch (129:12): [True: 197M, False: 57.5M]
  |  Branch (129:24): [True: 3.76M, False: 193M]
  ------------------
  130|   255M|}
lexer.cpp:_ZN7jsonnet8internalL8is_lowerEc:
  133|   251M|{
  134|   251M|    return c >= 'a' && c <= 'z';
  ------------------
  |  Branch (134:12): [True: 189M, False: 62.3M]
  |  Branch (134:24): [True: 188M, False: 198k]
  ------------------
  135|   251M|}
lexer.cpp:_ZN7jsonnet8internalL13is_identifierEc:
  148|   205M|{
  149|   205M|    return is_identifier_first(c) || is_number(c);
  ------------------
  |  Branch (149:12): [True: 157M, False: 47.7M]
  |  Branch (149:38): [True: 10.1M, False: 37.6M]
  ------------------
  150|   205M|}
lexer.cpp:_ZN7jsonnet8internalL9is_numberEc:
  138|  47.7M|{
  139|  47.7M|    return c >= '0' && c <= '9';
  ------------------
  |  Branch (139:12): [True: 13.3M, False: 34.3M]
  |  Branch (139:24): [True: 10.1M, False: 3.27M]
  ------------------
  140|  47.7M|}
lexer.cpp:_ZN7jsonnet8internalL9is_symbolEc:
  153|  45.3M|{
  154|  45.3M|    switch (c) {
  ------------------
  |  Branch (154:13): [True: 33.9M, False: 11.3M]
  ------------------
  155|   941k|        case '!':
  ------------------
  |  Branch (155:9): [True: 941k, False: 44.4M]
  ------------------
  156|  1.08M|        case '$':
  ------------------
  |  Branch (156:9): [True: 141k, False: 45.2M]
  ------------------
  157|  5.74M|        case ':':
  ------------------
  |  Branch (157:9): [True: 4.66M, False: 40.6M]
  ------------------
  158|  6.12M|        case '~':
  ------------------
  |  Branch (158:9): [True: 379k, False: 44.9M]
  ------------------
  159|  12.1M|        case '+':
  ------------------
  |  Branch (159:9): [True: 6.04M, False: 39.3M]
  ------------------
  160|  12.9M|        case '-':
  ------------------
  |  Branch (160:9): [True: 818k, False: 44.5M]
  ------------------
  161|  13.8M|        case '&':
  ------------------
  |  Branch (161:9): [True: 898k, False: 44.4M]
  ------------------
  162|  14.3M|        case '|':
  ------------------
  |  Branch (162:9): [True: 498k, False: 44.8M]
  ------------------
  163|  14.3M|        case '^':
  ------------------
  |  Branch (163:9): [True: 1.83k, False: 45.3M]
  ------------------
  164|  23.9M|        case '=':
  ------------------
  |  Branch (164:9): [True: 9.60M, False: 35.7M]
  ------------------
  165|  24.7M|        case '<':
  ------------------
  |  Branch (165:9): [True: 782k, False: 44.5M]
  ------------------
  166|  25.8M|        case '>':
  ------------------
  |  Branch (166:9): [True: 1.06M, False: 44.2M]
  ------------------
  167|  32.7M|        case '*':
  ------------------
  |  Branch (167:9): [True: 6.90M, False: 38.4M]
  ------------------
  168|  33.5M|        case '/':
  ------------------
  |  Branch (168:9): [True: 837k, False: 44.5M]
  ------------------
  169|  33.9M|        case '%': return true;
  ------------------
  |  Branch (169:9): [True: 392k, False: 44.9M]
  ------------------
  170|  45.3M|    }
  171|  11.3M|    return false;
  172|  45.3M|}
lexer.cpp:_ZN7jsonnet8internalL17lex_until_newlineERPKcRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERjSC_S3_Rm:
  113|  2.32M|{
  114|  2.32M|    const char *original_c = c;
  115|  2.32M|    const char *last_non_space = c;
  116|  37.3M|    for (; *c != '\0' && *c != '\n'; c++) {
  ------------------
  |  Branch (116:12): [True: 37.3M, False: 206]
  |  Branch (116:26): [True: 34.9M, False: 2.32M]
  ------------------
  117|  34.9M|        if (!is_horz_ws(*c))
  ------------------
  |  Branch (117:13): [True: 30.3M, False: 4.65M]
  ------------------
  118|  30.3M|            last_non_space = c;
  119|  34.9M|    }
  120|  2.32M|    text = std::string(original_c, last_non_space - original_c + 1);
  121|       |    // Consume subsequent whitespace including the '\n'.
  122|  2.32M|    unsigned new_lines;
  123|  2.32M|    lex_ws(c, new_lines, indent, line_start, line_number);
  124|  2.32M|    blanks = new_lines == 0 ? 0 : new_lines - 1;
  ------------------
  |  Branch (124:14): [True: 206, False: 2.32M]
  ------------------
  125|  2.32M|}
lexer.cpp:_ZN7jsonnet8internalL10line_splitERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   60|  67.4k|{
   61|  67.4k|    std::vector<std::string> ret;
   62|  67.4k|    std::stringstream ss;
   63|  37.0M|    for (size_t i = 0; i < s.length(); ++i) {
  ------------------
  |  Branch (63:24): [True: 36.9M, False: 67.4k]
  ------------------
   64|  36.9M|        if (s[i] == '\n') {
  ------------------
  |  Branch (64:13): [True: 5.72M, False: 31.2M]
  ------------------
   65|  5.72M|            ret.emplace_back(strip_ws(ss.str(), margin));
   66|  5.72M|            ss.str("");
   67|  31.2M|        } else {
   68|  31.2M|            ss << s[i];
   69|  31.2M|        }
   70|  36.9M|    }
   71|  67.4k|    ret.emplace_back(strip_ws(ss.str(), margin));
   72|  67.4k|    return ret;
   73|  67.4k|}
lexer.cpp:_ZN7jsonnet8internalL8strip_wsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   45|  5.78M|{
   46|  5.78M|    if (s.size() == 0)
  ------------------
  |  Branch (46:9): [True: 4.96M, False: 821k]
  ------------------
   47|  4.96M|        return s;  // Avoid underflow below.
   48|   821k|    size_t i = 0;
   49|  2.34M|    while (i < s.length() && is_horz_ws(s[i]) && i < margin)
  ------------------
  |  Branch (49:12): [True: 2.33M, False: 4.02k]
  |  Branch (49:30): [True: 1.88M, False: 454k]
  |  Branch (49:50): [True: 1.51M, False: 363k]
  ------------------
   50|  1.51M|        i++;
   51|   821k|    size_t j = s.size();
   52|  2.64M|    while (j > i && is_horz_ws(s[j - 1])) {
  ------------------
  |  Branch (52:12): [True: 2.53M, False: 116k]
  |  Branch (52:21): [True: 1.82M, False: 705k]
  ------------------
   53|  1.82M|        j--;
   54|  1.82M|    }
   55|   821k|    return std::string(&s[i], &s[j]);
   56|  5.78M|}
lexer.cpp:_ZN7jsonnet8internalL10is_horz_wsEc:
   33|   238M|{
   34|   238M|    return c == ' ' || c == '\t' || c == '\r';
  ------------------
  |  Branch (34:12): [True: 114M, False: 123M]
  |  Branch (34:24): [True: 67.8k, False: 123M]
  |  Branch (34:37): [True: 539k, False: 122M]
  ------------------
   35|   238M|}
lexer.cpp:_ZN7jsonnet8internalL16whitespace_checkEPKcS2_:
  489|  11.8k|{
  490|  11.8k|    int i = 0;
  491|   109k|    while (a[i] == ' ' || a[i] == '\t') {
  ------------------
  |  Branch (491:12): [True: 1.68k, False: 107k]
  |  Branch (491:27): [True: 100k, False: 6.81k]
  ------------------
  492|   102k|        if (b[i] != a[i])
  ------------------
  |  Branch (492:13): [True: 4.99k, False: 97.4k]
  ------------------
  493|  4.99k|            return 0;
  494|  97.4k|        i++;
  495|  97.4k|    }
  496|  6.81k|    return i;
  497|  11.8k|}
lexer.cpp:_ZN7jsonnet8internalL19describe_whitespaceERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_12basic_stringIcS4_S6_EE:
  499|     74|static void describe_whitespace(std::stringstream& msg, const std::string& ws) {
  500|     74|    int spaces = 0;
  501|     74|    int tabs = 0;
  502|  1.30k|    for (char c : ws) {
  ------------------
  |  Branch (502:17): [True: 1.30k, False: 74]
  ------------------
  503|  1.30k|        if (c == ' ')
  ------------------
  |  Branch (503:13): [True: 324, False: 985]
  ------------------
  504|    324|            spaces++;
  505|    985|        else if (c == '\t')
  ------------------
  |  Branch (505:18): [True: 985, False: 0]
  ------------------
  506|    985|            tabs++;
  507|  1.30k|    }
  508|     74|    if (spaces > 0 && tabs > 0) {
  ------------------
  |  Branch (508:9): [True: 36, False: 38]
  |  Branch (508:23): [True: 8, False: 28]
  ------------------
  509|      8|        msg << spaces << (spaces == 1 ? " space" : " spaces") << " and " << tabs
  ------------------
  |  Branch (509:27): [True: 7, False: 1]
  ------------------
  510|      8|            << (tabs == 1 ? " tab" : " tabs");
  ------------------
  |  Branch (510:17): [True: 2, False: 6]
  ------------------
  511|     66|    } else if (spaces > 0) {
  ------------------
  |  Branch (511:16): [True: 28, False: 38]
  ------------------
  512|     28|        msg << spaces << (spaces == 1 ? " space" : " spaces");
  ------------------
  |  Branch (512:27): [True: 11, False: 17]
  ------------------
  513|     38|    } else if (tabs > 0) {
  ------------------
  |  Branch (513:16): [True: 38, False: 0]
  ------------------
  514|     38|        msg << tabs << (tabs == 1 ? " tab" : " tabs");
  ------------------
  |  Branch (514:25): [True: 13, False: 25]
  ------------------
  515|     38|    } else {
  516|      0|        msg << "no indentation";
  517|      0|    }
  518|     74|}

_ZN7jsonnet8internal13FodderElementC2ENS1_4KindEjjRKNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE:
   92|  11.8M|        : kind(kind), blanks(blanks), indent(indent), comment(comment)
   93|  11.8M|    {
   94|  11.8M|        assert(kind != LINE_END || comment.size() <= 1);
  ------------------
  |  Branch (94:9): [True: 2.40M, False: 9.47M]
  |  Branch (94:9): [True: 9.47M, False: 0]
  |  Branch (94:9): [True: 11.8M, False: 0]
  ------------------
   95|  11.8M|        assert(kind != INTERSTITIAL || (blanks == 0 && indent == 0 && comment.size() == 1));
  ------------------
  |  Branch (95:9): [True: 17.5k, False: 0]
  |  Branch (95:9): [True: 17.5k, False: 0]
  |  Branch (95:9): [True: 17.5k, False: 0]
  |  Branch (95:9): [True: 11.8M, False: 17.5k]
  |  Branch (95:9): [True: 11.8M, False: 0]
  ------------------
   96|  11.8M|        assert(kind != PARAGRAPH || comment.size() >= 1);
  ------------------
  |  Branch (96:9): [True: 9.49M, False: 2.38M]
  |  Branch (96:9): [True: 2.38M, False: 0]
  |  Branch (96:9): [True: 11.8M, False: 0]
  ------------------
   97|  11.8M|    }
_ZNK7jsonnet8internal5Token6data32Ev:
  299|  30.5M|    {
  300|  30.5M|        return decode_utf8(data);
  301|  30.5M|    }
_ZN7jsonnet8internal5TokenC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS6_IcEEEESH_SH_RKNS0_13LocationRangeE:
  308|  86.5M|        : kind(kind),
  309|  86.5M|          fodder(fodder),
  310|  86.5M|          data(data),
  311|  86.5M|          stringBlockIndent(string_block_indent),
  312|  86.5M|          stringBlockTermIndent(string_block_term_indent),
  313|  86.5M|          location(location)
  314|  86.5M|    {
  315|  86.5M|    }
_ZN7jsonnet8internal5Token8toStringENS1_4KindE:
  320|    900|    {
  321|    900|        switch (v) {
  322|     10|            case BRACE_L: return "\"{\"";
  ------------------
  |  Branch (322:13): [True: 10, False: 890]
  ------------------
  323|     26|            case BRACE_R: return "\"}\"";
  ------------------
  |  Branch (323:13): [True: 26, False: 874]
  ------------------
  324|      0|            case BRACKET_L: return "\"[\"";
  ------------------
  |  Branch (324:13): [True: 0, False: 900]
  ------------------
  325|     53|            case BRACKET_R: return "\"]\"";
  ------------------
  |  Branch (325:13): [True: 53, False: 847]
  ------------------
  326|     50|            case COMMA: return "\",\"";
  ------------------
  |  Branch (326:13): [True: 50, False: 850]
  ------------------
  327|     33|            case DOLLAR: return "\"$\"";
  ------------------
  |  Branch (327:13): [True: 33, False: 867]
  ------------------
  328|     17|            case DOT: return "\".\"";
  ------------------
  |  Branch (328:13): [True: 17, False: 883]
  ------------------
  329|       |
  330|      0|            case PAREN_L: return "\"(\"";
  ------------------
  |  Branch (330:13): [True: 0, False: 900]
  ------------------
  331|     32|            case PAREN_R: return "\")\"";
  ------------------
  |  Branch (331:13): [True: 32, False: 868]
  ------------------
  332|     29|            case SEMICOLON: return "\";\"";
  ------------------
  |  Branch (332:13): [True: 29, False: 871]
  ------------------
  333|       |
  334|     94|            case IDENTIFIER: return "IDENTIFIER";
  ------------------
  |  Branch (334:13): [True: 94, False: 806]
  ------------------
  335|     33|            case NUMBER: return "NUMBER";
  ------------------
  |  Branch (335:13): [True: 33, False: 867]
  ------------------
  336|    115|            case OPERATOR: return "OPERATOR";
  ------------------
  |  Branch (336:13): [True: 115, False: 785]
  ------------------
  337|     20|            case STRING_SINGLE: return "STRING_SINGLE";
  ------------------
  |  Branch (337:13): [True: 20, False: 880]
  ------------------
  338|     11|            case STRING_DOUBLE: return "STRING_DOUBLE";
  ------------------
  |  Branch (338:13): [True: 11, False: 889]
  ------------------
  339|      2|            case VERBATIM_STRING_SINGLE: return "VERBATIM_STRING_SINGLE";
  ------------------
  |  Branch (339:13): [True: 2, False: 898]
  ------------------
  340|      3|            case VERBATIM_STRING_DOUBLE: return "VERBATIM_STRING_DOUBLE";
  ------------------
  |  Branch (340:13): [True: 3, False: 897]
  ------------------
  341|     10|            case STRING_BLOCK: return "STRING_BLOCK";
  ------------------
  |  Branch (341:13): [True: 10, False: 890]
  ------------------
  342|       |
  343|      0|            case ASSERT: return "assert";
  ------------------
  |  Branch (343:13): [True: 0, False: 900]
  ------------------
  344|      2|            case ELSE: return "else";
  ------------------
  |  Branch (344:13): [True: 2, False: 898]
  ------------------
  345|      0|            case ERROR: return "error";
  ------------------
  |  Branch (345:13): [True: 0, False: 900]
  ------------------
  346|      0|            case FALSE: return "false";
  ------------------
  |  Branch (346:13): [True: 0, False: 900]
  ------------------
  347|      1|            case FOR: return "for";
  ------------------
  |  Branch (347:13): [True: 1, False: 899]
  ------------------
  348|      1|            case FUNCTION: return "function";
  ------------------
  |  Branch (348:13): [True: 1, False: 899]
  ------------------
  349|      0|            case IF: return "if";
  ------------------
  |  Branch (349:13): [True: 0, False: 900]
  ------------------
  350|      0|            case IMPORT: return "import";
  ------------------
  |  Branch (350:13): [True: 0, False: 900]
  ------------------
  351|      0|            case IMPORTSTR: return "importstr";
  ------------------
  |  Branch (351:13): [True: 0, False: 900]
  ------------------
  352|      0|            case IMPORTBIN: return "importbin";
  ------------------
  |  Branch (352:13): [True: 0, False: 900]
  ------------------
  353|     24|            case IN: return "in";
  ------------------
  |  Branch (353:13): [True: 24, False: 876]
  ------------------
  354|      1|            case LOCAL: return "local";
  ------------------
  |  Branch (354:13): [True: 1, False: 899]
  ------------------
  355|      0|            case NULL_LIT: return "null";
  ------------------
  |  Branch (355:13): [True: 0, False: 900]
  ------------------
  356|      0|            case SELF: return "self";
  ------------------
  |  Branch (356:13): [True: 0, False: 900]
  ------------------
  357|      1|            case SUPER: return "super";
  ------------------
  |  Branch (357:13): [True: 1, False: 899]
  ------------------
  358|      1|            case TAILSTRICT: return "tailstrict";
  ------------------
  |  Branch (358:13): [True: 1, False: 899]
  ------------------
  359|      4|            case THEN: return "then";
  ------------------
  |  Branch (359:13): [True: 4, False: 896]
  ------------------
  360|      0|            case TRUE: return "true";
  ------------------
  |  Branch (360:13): [True: 0, False: 900]
  ------------------
  361|       |
  362|    327|            case END_OF_FILE: return "end of file";
  ------------------
  |  Branch (362:13): [True: 327, False: 573]
  ------------------
  363|      0|            default:
  ------------------
  |  Branch (363:13): [True: 0, False: 900]
  ------------------
  364|      0|                std::cerr << "INTERNAL ERROR: Unknown token kind: " << v << std::endl;
  365|      0|                std::abort();
  366|    900|        }
  367|    900|    }
parser.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS0_5Token4KindE:
  387|    524|{
  388|    524|    o << Token::toString(v);
  389|    524|    return o;
  390|    524|}
parser.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_5TokenE:
  393|    407|{
  394|    407|    if (v.data == "") {
  ------------------
  |  Branch (394:9): [True: 276, False: 131]
  ------------------
  395|    276|        o << Token::toString(v.kind);
  396|    276|    } else if (v.kind == Token::OPERATOR) {
  ------------------
  |  Branch (396:16): [True: 31, False: 100]
  ------------------
  397|     31|        o << "\"" << v.data << "\"";
  398|    100|    } else {
  399|    100|        o << "(" << Token::toString(v.kind) << ", \"" << v.data << "\")";
  400|    100|    }
  401|    407|    return o;
  402|    407|}
lexer.cpp:_ZN7jsonnet8internalL16fodder_push_backERNSt3__16vectorINS0_13FodderElementENS1_9allocatorIS3_EEEERKS3_:
  143|  67.4k|{
  144|  67.4k|    if (fodder_has_clean_endline(a) && elem.kind == FodderElement::LINE_END) {
  ------------------
  |  Branch (144:9): [True: 56.2k, False: 11.2k]
  |  Branch (144:40): [True: 0, False: 56.2k]
  ------------------
  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|  67.4k|    } else {
  154|  67.4k|        if (!fodder_has_clean_endline(a) && elem.kind == FodderElement::PARAGRAPH) {
  ------------------
  |  Branch (154:13): [True: 11.2k, False: 56.2k]
  |  Branch (154:45): [True: 11.2k, False: 0]
  ------------------
  155|  11.2k|            a.emplace_back(FodderElement::LINE_END, 0, elem.indent, std::vector<std::string>());
  156|  11.2k|        }
  157|  67.4k|        a.push_back(elem);
  158|  67.4k|    }
  159|  67.4k|}
lexer.cpp:_ZN7jsonnet8internalL24fodder_has_clean_endlineERKNSt3__16vectorINS0_13FodderElementENS1_9allocatorIS3_EEEE:
  134|   134k|{
  135|   134k|    return !fodder.empty() && fodder.back().kind != FodderElement::INTERSTITIAL;
  ------------------
  |  Branch (135:12): [True: 117k, False: 17.8k]
  |  Branch (135:31): [True: 112k, False: 4.62k]
  ------------------
  136|   134k|}

jsonnet_version:
  334|  12.3k|{
  335|  12.3k|    return LIB_JSONNET_VERSION;
  ------------------
  |  |   34|  12.3k|#define LIB_JSONNET_VERSION "v0.22.0"
  ------------------
  336|  12.3k|}
jsonnet_make:
  339|  6.18k|{
  340|  6.18k|    TRY
  ------------------
  |  |  319|  6.18k|#define TRY try {
  ------------------
  341|  6.18k|        return new JsonnetVm();
  342|  6.18k|    CATCH("jsonnet_make")
  ------------------
  |  |  321|  6.18k|    }                                                                                         \
  |  |  322|  6.18k|    catch (const std::bad_alloc &)                                                            \
  |  |  323|  6.18k|    {                                                                                         \
  |  |  324|      0|        memory_panic();                                                                       \
  |  |  325|      0|    }                                                                                         \
  |  |  326|  6.18k|    catch (const std::exception &e)                                                           \
  |  |  327|  6.18k|    {                                                                                         \
  |  |  328|      0|        std::cerr << "Something went wrong during " func ", please report this: " << e.what() \
  |  |  329|      0|                  << std::endl;                                                               \
  |  |  330|      0|        abort();                                                                              \
  |  |  331|      0|    }
  ------------------
  343|      0|    return nullptr;
  344|  6.18k|}
jsonnet_destroy:
  347|  6.18k|{
  348|  6.18k|    TRY
  ------------------
  |  |  319|  6.18k|#define TRY try {
  ------------------
  349|  6.18k|        delete vm;
  350|  6.18k|    CATCH("jsonnet_destroy")
  ------------------
  |  |  321|  6.18k|    }                                                                                         \
  |  |  322|  6.18k|    catch (const std::bad_alloc &)                                                            \
  |  |  323|  6.18k|    {                                                                                         \
  |  |  324|      0|        memory_panic();                                                                       \
  |  |  325|      0|    }                                                                                         \
  |  |  326|  6.18k|    catch (const std::exception &e)                                                           \
  |  |  327|  6.18k|    {                                                                                         \
  |  |  328|      0|        std::cerr << "Something went wrong during " func ", please report this: " << e.what() \
  |  |  329|      0|                  << std::endl;                                                               \
  |  |  330|      0|        abort();                                                                              \
  |  |  331|      0|    }
  ------------------
  351|  6.18k|}
jsonnet_import_callback:
  379|  6.18k|{
  380|  6.18k|    vm->importCallback = cb;
  381|  6.18k|    vm->importCallbackContext = ctx;
  382|  6.18k|}
jsonnet_evaluate_snippet_multi:
  738|  6.18k|{
  739|  6.18k|    TRY
  ------------------
  |  |  319|  6.18k|#define TRY try {
  ------------------
  740|  6.18k|        return jsonnet_evaluate_snippet_aux(vm, filename, snippet, error, MULTI);
  741|  6.18k|    CATCH("jsonnet_evaluate_snippet_multi")
  ------------------
  |  |  321|  6.18k|    }                                                                                         \
  |  |  322|  6.18k|    catch (const std::bad_alloc &)                                                            \
  |  |  323|  6.18k|    {                                                                                         \
  |  |  324|      0|        memory_panic();                                                                       \
  |  |  325|      0|    }                                                                                         \
  |  |  326|  6.18k|    catch (const std::exception &e)                                                           \
  |  |  327|  6.18k|    {                                                                                         \
  |  |  328|      0|        std::cerr << "Something went wrong during " func ", please report this: " << e.what() \
  |  |  329|      0|                  << std::endl;                                                               \
  |  |  330|      0|        abort();                                                                              \
  |  |  331|      0|    }
  ------------------
  742|      0|    return nullptr;  // Never happens.
  743|  6.18k|}
jsonnet_realloc:
  755|  11.9k|{
  756|  11.9k|    (void)vm;
  757|  11.9k|    if (str == nullptr) {
  ------------------
  |  Branch (757:9): [True: 5.76k, False: 6.18k]
  ------------------
  758|  5.76k|        if (sz == 0)
  ------------------
  |  Branch (758:13): [True: 0, False: 5.76k]
  ------------------
  759|      0|            return nullptr;
  760|  5.76k|        auto *r = static_cast<char *>(::malloc(sz));
  761|  5.76k|        if (r == nullptr)
  ------------------
  |  Branch (761:13): [True: 0, False: 5.76k]
  ------------------
  762|      0|            memory_panic();
  763|  5.76k|        return r;
  764|  6.18k|    } else {
  765|  6.18k|        if (sz == 0) {
  ------------------
  |  Branch (765:13): [True: 6.18k, False: 0]
  ------------------
  766|  6.18k|            ::free(str);
  767|  6.18k|            return nullptr;
  768|  6.18k|        } else {
  769|      0|            auto *r = static_cast<char *>(::realloc(str, sz));
  770|      0|            if (r == nullptr)
  ------------------
  |  Branch (770:17): [True: 0, False: 0]
  ------------------
  771|      0|                memory_panic();
  772|      0|            return r;
  773|      0|        }
  774|  6.18k|    }
  775|  11.9k|}
_ZN9JsonnetVmC2Ev:
  228|  6.18k|        : gcGrowthTrigger(2.0),
  229|  6.18k|          maxStack(500),
  230|  6.18k|          gcMinObjects(1000),
  231|  6.18k|          maxTrace(20),
  232|  6.18k|          importCallback(default_import_callback),
  233|  6.18k|          importCallbackContext(this),
  234|  6.18k|          stringOutput(false),
  235|  6.18k|          trailingNewline(true),
  236|  6.18k|          fmtDebugDesugaring(false)
  237|  6.18k|    {
  238|  6.18k|        jpaths.emplace_back("/usr/share/jsonnet-" + std::string(jsonnet_version()) + "/");
  239|  6.18k|        jpaths.emplace_back("/usr/local/share/jsonnet-" + std::string(jsonnet_version()) + "/");
  240|  6.18k|    }
libjsonnet.cpp:_ZL11from_stringP9JsonnetVmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   90|  5.76k|{
   91|  5.76k|    char *r = jsonnet_realloc(vm, nullptr, v.length() + 1);
   92|  5.76k|    std::memcpy(r, v.c_str(), v.length() + 1);
   93|  5.76k|    return r;
   94|  5.76k|}
libjsonnet.cpp:_ZL28jsonnet_evaluate_snippet_auxP9JsonnetVmPKcS2_PiN12_GLOBAL__N_18EvalKindE:
  541|  6.18k|{
  542|  6.18k|    try {
  543|  6.18k|        Allocator alloc;
  544|  6.18k|        AST *expr;
  545|  6.18k|        Tokens tokens = jsonnet_lex(filename, snippet);
  546|       |
  547|  6.18k|        expr = jsonnet_parse(&alloc, tokens);
  548|       |
  549|  6.18k|        jsonnet_desugar(&alloc, expr, &vm->tla);
  550|       |
  551|  6.18k|        unsigned max_stack = vm->maxStack;
  552|       |
  553|       |        // For the stdlib desugaring.
  554|  6.18k|        max_stack++;
  555|       |
  556|       |        // For the TLA desugaring.
  557|  6.18k|        max_stack++;
  558|       |
  559|  6.18k|        jsonnet_static_analysis(expr);
  560|  6.18k|        switch (kind) {
  561|      0|            case REGULAR: {
  ------------------
  |  Branch (561:13): [True: 0, False: 6.18k]
  ------------------
  562|      0|                std::string json_str = jsonnet_vm_execute(&alloc,
  563|      0|                                                          expr,
  564|      0|                                                          vm->ext,
  565|      0|                                                          max_stack,
  566|      0|                                                          vm->gcMinObjects,
  567|      0|                                                          vm->gcGrowthTrigger,
  568|      0|                                                          vm->nativeCallbacks,
  569|      0|                                                          vm->importCallback,
  570|      0|                                                          vm->importCallbackContext,
  571|      0|                                                          vm->stringOutput);
  572|      0|                if (vm->trailingNewline) {
  ------------------
  |  Branch (572:21): [True: 0, False: 0]
  ------------------
  573|      0|                    json_str += "\n";
  574|      0|                }
  575|      0|                *error = false;
  576|      0|                return from_string(vm, json_str);
  577|      0|            } break;
  578|       |
  579|  2.87k|            case MULTI: {
  ------------------
  |  Branch (579:13): [True: 2.87k, False: 3.31k]
  ------------------
  580|  2.87k|                std::map<std::string, std::string> files =
  581|  2.87k|                    jsonnet_vm_execute_multi(&alloc,
  582|  2.87k|                                             expr,
  583|  2.87k|                                             vm->ext,
  584|  2.87k|                                             max_stack,
  585|  2.87k|                                             vm->gcMinObjects,
  586|  2.87k|                                             vm->gcGrowthTrigger,
  587|  2.87k|                                             vm->nativeCallbacks,
  588|  2.87k|                                             vm->importCallback,
  589|  2.87k|                                             vm->importCallbackContext,
  590|  2.87k|                                             vm->stringOutput);
  591|  2.87k|                size_t sz = 1;  // final sentinel
  592|  3.17k|                for (const auto &pair : files) {
  ------------------
  |  Branch (592:39): [True: 3.17k, False: 2.87k]
  ------------------
  593|  3.17k|                    sz += pair.first.length() + 1;   // include sentinel
  594|  3.17k|                    sz += pair.second.length() + 2;  // Add a '\n' as well as sentinel
  595|  3.17k|                }
  596|  2.87k|                char *buf = (char *)::malloc(sz);
  597|  2.87k|                if (buf == nullptr)
  ------------------
  |  Branch (597:21): [True: 0, False: 2.87k]
  ------------------
  598|      0|                    memory_panic();
  599|  2.87k|                std::ptrdiff_t i = 0;
  600|  3.17k|                for (const auto &pair : files) {
  ------------------
  |  Branch (600:39): [True: 3.17k, False: 2.87k]
  ------------------
  601|  3.17k|                    memcpy(&buf[i], pair.first.c_str(), pair.first.length() + 1);
  602|  3.17k|                    i += pair.first.length() + 1;
  603|  3.17k|                    memcpy(&buf[i], pair.second.c_str(), pair.second.length());
  604|  3.17k|                    i += pair.second.length();
  605|  3.17k|                    if (vm->trailingNewline) {
  ------------------
  |  Branch (605:25): [True: 3.17k, False: 0]
  ------------------
  606|  3.17k|                        buf[i] = '\n';
  607|  3.17k|                        i++;
  608|  3.17k|                    }
  609|  3.17k|                    buf[i] = '\0';
  610|  3.17k|                    i++;
  611|  3.17k|                }
  612|  2.87k|                buf[i] = '\0';  // final sentinel
  613|  2.87k|                *error = false;
  614|  2.87k|                return buf;
  615|      0|            } break;
  616|       |
  617|      0|            case STREAM: {
  ------------------
  |  Branch (617:13): [True: 0, False: 6.18k]
  ------------------
  618|      0|                if (!vm->trailingNewline) {
  ------------------
  |  Branch (618:21): [True: 0, False: 0]
  ------------------
  619|      0|                    *error = true;
  620|      0|                    return from_string(vm, "INTERNAL: trailing-newline is required for streamed output");
  621|      0|                }
  622|      0|                std::vector<std::string> documents =
  623|      0|                    jsonnet_vm_execute_stream(&alloc,
  624|      0|                                              expr,
  625|      0|                                              vm->ext,
  626|      0|                                              max_stack,
  627|      0|                                              vm->gcMinObjects,
  628|      0|                                              vm->gcGrowthTrigger,
  629|      0|                                              vm->nativeCallbacks,
  630|      0|                                              vm->importCallback,
  631|      0|                                              vm->importCallbackContext,
  632|      0|                                              vm->stringOutput);
  633|      0|                size_t sz = 1;  // final sentinel
  634|      0|                for (const auto &doc : documents) {
  ------------------
  |  Branch (634:38): [True: 0, False: 0]
  ------------------
  635|      0|                    sz += doc.length() + 2;  // Add a '\n' as well as sentinel
  636|      0|                }
  637|      0|                char *buf = (char *)::malloc(sz);
  638|      0|                if (buf == nullptr)
  ------------------
  |  Branch (638:21): [True: 0, False: 0]
  ------------------
  639|      0|                    memory_panic();
  640|      0|                std::ptrdiff_t i = 0;
  641|      0|                for (const auto &doc : documents) {
  ------------------
  |  Branch (641:38): [True: 0, False: 0]
  ------------------
  642|      0|                    memcpy(&buf[i], doc.c_str(), doc.length());
  643|      0|                    i += doc.length();
  644|      0|                    buf[i] = '\n';
  645|      0|                    i++;
  646|      0|                    buf[i] = '\0';
  647|      0|                    i++;
  648|      0|                }
  649|      0|                buf[i] = '\0';  // final sentinel
  650|      0|                *error = false;
  651|      0|                return buf;
  652|      0|            } break;
  653|       |
  654|      0|            default:
  ------------------
  |  Branch (654:13): [True: 0, False: 6.18k]
  ------------------
  655|      0|                fputs("INTERNAL ERROR: bad value of 'kind', probably memory corruption.\n", stderr);
  656|      0|                abort();
  657|  6.18k|        }
  658|       |
  659|  6.18k|    } catch (StaticError &e) {
  660|  3.31k|        std::stringstream ss;
  661|  3.31k|        ss << "STATIC ERROR: " << e << std::endl;
  662|  3.31k|        *error = true;
  663|  3.31k|        return from_string(vm, ss.str());
  664|       |
  665|  3.31k|    } catch (RuntimeError &e) {
  666|  2.45k|        std::stringstream ss;
  667|  2.45k|        ss << "RUNTIME ERROR: " << e.msg << std::endl;
  668|  2.45k|        const long max_above = vm->maxTrace / 2;
  669|  2.45k|        const long max_below = vm->maxTrace - max_above;
  670|  2.45k|        const long sz = e.stackTrace.size();
  671|   250k|        for (long i = 0; i < sz; ++i) {
  ------------------
  |  Branch (671:26): [True: 248k, False: 2.45k]
  ------------------
  672|   248k|            const auto &f = e.stackTrace[i];
  673|   248k|            if (vm->maxTrace > 0 && i >= max_above && i < sz - max_below) {
  ------------------
  |  Branch (673:17): [True: 248k, False: 0]
  |  Branch (673:37): [True: 237k, False: 11.1k]
  |  Branch (673:55): [True: 230k, False: 6.87k]
  ------------------
  674|   230k|                if (i == max_above)
  ------------------
  |  Branch (674:21): [True: 605, False: 229k]
  ------------------
  675|    605|                    ss << "\t..." << std::endl;
  676|   230k|            } else {
  677|  18.0k|                ss << "\t" << f.location << "\t" << f.name << std::endl;
  678|  18.0k|            }
  679|   248k|        }
  680|  2.45k|        *error = true;
  681|  2.45k|        return from_string(vm, ss.str());
  682|  2.45k|    }
  683|       |
  684|      0|    return nullptr;  // Quiet, compiler.
  685|  6.18k|}

_ZN7jsonnet8internal22jsonnet_unparse_numberEd:
   38|  4.84M|{
   39|  4.84M|    std::stringstream ss;
   40|       |    // Make sure we output the same thing, even if the user
   41|       |    // of the library changed the global locale
   42|  4.84M|    ss.imbue(std::locale::classic());
   43|  4.84M|    if (v == floor(v)) {
  ------------------
  |  Branch (43:9): [True: 4.71M, False: 129k]
  ------------------
   44|  4.71M|        ss << std::fixed << std::setprecision(0) << v;
   45|  4.71M|    } else {
   46|       |        // See "What Every Computer Scientist Should Know About Floating-Point Arithmetic"
   47|       |        // Theorem 15
   48|       |        // https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
   49|   129k|        ss << std::setprecision(17);
   50|   129k|        ss << v;
   51|   129k|    }
   52|  4.84M|    return ss.str();
   53|  4.84M|}
_ZN7jsonnet8internal13jsonnet_parseEPNS0_9AllocatorERNSt3__14listINS0_5TokenENS3_9allocatorIS5_EEEE:
 1210|  11.9k|{
 1211|  11.9k|    Parser parser(tokens, alloc);
 1212|  11.9k|    unsigned parse_depth = 0;
 1213|  11.9k|    AST *expr = parser.parse(MAX_PRECEDENCE, parse_depth);
 1214|  11.9k|    if (tokens.front().kind != Token::END_OF_FILE) {
  ------------------
  |  Branch (1214:9): [True: 163, False: 11.8k]
  ------------------
 1215|    163|        std::stringstream ss;
 1216|    163|        ss << "did not expect: " << tokens.front();
 1217|    163|        throw StaticError(tokens.front().location, ss.str());
 1218|    163|    }
 1219|       |
 1220|  11.8k|    return expr;
 1221|  11.9k|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16ParserC2ERNSt3__14listINS0_5TokenENS3_9allocatorIS5_EEEEPNS0_9AllocatorE:
  155|  11.9k|    Parser(Tokens &tokens, Allocator *alloc) : tokens(tokens), alloc(alloc) {}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser5parseEjj:
  980|  33.3M|    {
  981|  33.3M|        if (current_depth >= MAX_PARSER_DEPTH) {
  ------------------
  |  Branch (981:13): [True: 3, False: 33.3M]
  ------------------
  982|      3|            throw StaticError(peek().location, "Exceeded maximum parse depth limit.");
  983|      3|        }
  984|       |
  985|  33.3M|        AST *ast = maybeParseGreedy(current_depth + 1);
  986|       |        // There cannot be an operator after a greedy parse.
  987|  33.3M|        if (ast != nullptr) return ast;
  ------------------
  |  Branch (987:13): [True: 4.34M, False: 29.0M]
  ------------------
  988|       |
  989|       |        // If we get here, we could be parsing an infix construct.
  990|       |
  991|       |        // Allocate this on the heap to control stack growth.
  992|  29.0M|        std::unique_ptr<Token> begin_(new Token(peek()));
  993|  29.0M|        const Token &begin = *begin_;
  994|       |
  995|  29.0M|        AST *lhs = parseTerminalBracketsOrUnary(current_depth + 1);
  996|       |
  997|  29.0M|        return parseInfix(lhs, begin, max_precedence, current_depth + 1);
  998|  33.3M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser4peekEv:
  123|   275M|    {
  124|   275M|        return tokens.front();
  125|   275M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser16maybeParseGreedyEj:
  811|  33.3M|    {
  812|  33.3M|        if (current_depth >= MAX_PARSER_DEPTH) {
  ------------------
  |  Branch (812:13): [True: 2, False: 33.3M]
  ------------------
  813|      2|            throw StaticError(peek().location, "Exceeded maximum parse depth limit.");
  814|      2|        }
  815|       |
  816|       |        // Allocate this on the heap to control stack growth.
  817|  33.3M|        std::unique_ptr<Token> begin_(new Token(peek()));
  818|  33.3M|        const Token &begin = *begin_;
  819|       |
  820|  33.3M|        switch (begin.kind) {
  821|       |            // These cases have effectively MAX_PRECEDENCE as the first
  822|       |            // call to parse will parse them.
  823|   257k|            case Token::ASSERT: {
  ------------------
  |  Branch (823:13): [True: 257k, False: 33.1M]
  ------------------
  824|   257k|                pop();
  825|   257k|                AST *cond = parse(MAX_PRECEDENCE, current_depth + 1);
  826|   257k|                Fodder colonFodder;
  827|   257k|                AST *msg = nullptr;
  828|   257k|                if (peek().kind == Token::OPERATOR && peek().data == ":") {
  ------------------
  |  Branch (828:21): [True: 237k, False: 19.5k]
  |  Branch (828:55): [True: 237k, False: 1]
  ------------------
  829|   237k|                    Token colon = pop();
  830|   237k|                    colonFodder = colon.fodder;
  831|   237k|                    msg = parse(MAX_PRECEDENCE, current_depth + 1);
  832|   237k|                }
  833|   257k|                Token semicolon = popExpect(Token::SEMICOLON);
  834|   257k|                AST *rest = parse(MAX_PRECEDENCE, current_depth + 1);
  835|   257k|                return alloc->make<Assert>(span(begin, rest),
  836|   257k|                                           begin.fodder,
  837|   257k|                                           cond,
  838|   257k|                                           colonFodder,
  839|   257k|                                           msg,
  840|   257k|                                           semicolon.fodder,
  841|   257k|                                           rest);
  842|      0|            }
  843|       |
  844|   409k|            case Token::ERROR: {
  ------------------
  |  Branch (844:13): [True: 409k, False: 32.9M]
  ------------------
  845|   409k|                pop();
  846|   409k|                AST *expr = parse(MAX_PRECEDENCE, current_depth + 1);
  847|   409k|                return alloc->make<Error>(span(begin, expr), begin.fodder, expr);
  848|      0|            }
  849|       |
  850|  2.03M|            case Token::IF: {
  ------------------
  |  Branch (850:13): [True: 2.03M, False: 31.3M]
  ------------------
  851|  2.03M|                pop();
  852|  2.03M|                AST *cond = parse(MAX_PRECEDENCE, current_depth + 1);
  853|  2.03M|                Token then = popExpect(Token::THEN);
  854|  2.03M|                AST *branch_true = parse(MAX_PRECEDENCE, current_depth + 1);
  855|  2.03M|                if (peek().kind == Token::ELSE) {
  ------------------
  |  Branch (855:21): [True: 2.01M, False: 25.6k]
  ------------------
  856|  2.01M|                    Token else_ = pop();
  857|  2.01M|                    AST *branch_false = parse(MAX_PRECEDENCE, current_depth + 1);
  858|  2.01M|                    return alloc->make<Conditional>(span(begin, branch_false),
  859|  2.01M|                                                    begin.fodder,
  860|  2.01M|                                                    cond,
  861|  2.01M|                                                    then.fodder,
  862|  2.01M|                                                    branch_true,
  863|  2.01M|                                                    else_.fodder,
  864|  2.01M|                                                    branch_false);
  865|  2.01M|                }
  866|  25.6k|                return alloc->make<Conditional>(span(begin, branch_true),
  867|  25.6k|                                                begin.fodder,
  868|  25.6k|                                                cond,
  869|  25.6k|                                                then.fodder,
  870|  25.6k|                                                branch_true,
  871|  25.6k|                                                Fodder{},
  872|  25.6k|                                                nullptr);
  873|  2.03M|            }
  874|       |
  875|   126k|            case Token::FUNCTION: {
  ------------------
  |  Branch (875:13): [True: 126k, False: 33.2M]
  ------------------
  876|   126k|                pop();  // Still available in 'begin'.
  877|   126k|                Token paren_l = pop();
  878|   126k|                if (paren_l.kind == Token::PAREN_L) {
  ------------------
  |  Branch (878:21): [True: 126k, False: 6]
  ------------------
  879|   126k|                    std::vector<AST *> params_asts;
  880|   126k|                    bool got_comma;
  881|   126k|                    Fodder paren_r_fodder;
  882|   126k|                    ArgParams params = parseParams("function parameter", got_comma, paren_r_fodder, current_depth);
  883|   126k|                    AST *body = parse(MAX_PRECEDENCE, current_depth + 1);
  884|   126k|                    return alloc->make<Function>(span(begin, body),
  885|   126k|                                                 begin.fodder,
  886|   126k|                                                 paren_l.fodder,
  887|   126k|                                                 params,
  888|   126k|                                                 got_comma,
  889|   126k|                                                 paren_r_fodder,
  890|   126k|                                                 body);
  891|   126k|                } else {
  892|      6|                    std::stringstream ss;
  893|      6|                    ss << "expected ( but got " << paren_l;
  894|      6|                    throw StaticError(paren_l.location, ss.str());
  895|      6|                }
  896|   126k|            }
  897|       |
  898|    369|            case Token::IMPORT: {
  ------------------
  |  Branch (898:13): [True: 369, False: 33.3M]
  ------------------
  899|    369|                pop();
  900|    369|                AST *body = parse(MAX_PRECEDENCE, current_depth + 1);
  901|    369|                if (body->type == AST_LITERAL_STRING) {
  ------------------
  |  Branch (901:21): [True: 281, False: 88]
  ------------------
  902|    281|                    auto *lit = static_cast<LiteralString *>(body);
  903|    281|                    if (lit->tokenKind == LiteralString::BLOCK) {
  ------------------
  |  Branch (903:25): [True: 1, False: 280]
  ------------------
  904|      1|                        throw StaticError(lit->location,
  905|      1|                                          "Cannot use text blocks in import statements.");
  906|      1|                    }
  907|    280|                    return alloc->make<Import>(span(begin, body), begin.fodder, lit);
  908|    281|                } else {
  909|     88|                    std::stringstream ss;
  910|     88|                    ss << "computed imports are not allowed.";
  911|     88|                    throw StaticError(body->location, ss.str());
  912|     88|                }
  913|    369|            }
  914|       |
  915|  1.98k|            case Token::IMPORTSTR: {
  ------------------
  |  Branch (915:13): [True: 1.98k, False: 33.3M]
  ------------------
  916|  1.98k|                pop();
  917|  1.98k|                AST *body = parse(MAX_PRECEDENCE, current_depth + 1);
  918|  1.98k|                if (body->type == AST_LITERAL_STRING) {
  ------------------
  |  Branch (918:21): [True: 1.69k, False: 286]
  ------------------
  919|  1.69k|                    auto *lit = static_cast<LiteralString *>(body);
  920|  1.69k|                    if (lit->tokenKind == LiteralString::BLOCK) {
  ------------------
  |  Branch (920:25): [True: 1, False: 1.69k]
  ------------------
  921|      1|                        throw StaticError(lit->location,
  922|      1|                                          "Cannot use text blocks in import statements.");
  923|      1|                    }
  924|  1.69k|                    return alloc->make<Importstr>(span(begin, body), begin.fodder, lit);
  925|  1.69k|                } else {
  926|    286|                    std::stringstream ss;
  927|    286|                    ss << "computed imports are not allowed.";
  928|    286|                    throw StaticError(body->location, ss.str());
  929|    286|                }
  930|  1.98k|            }
  931|       |
  932|    704|            case Token::IMPORTBIN: {
  ------------------
  |  Branch (932:13): [True: 704, False: 33.3M]
  ------------------
  933|    704|                pop();
  934|    704|                AST *body = parse(MAX_PRECEDENCE, current_depth + 1);
  935|    704|                if (body->type == AST_LITERAL_STRING) {
  ------------------
  |  Branch (935:21): [True: 630, False: 74]
  ------------------
  936|    630|                    auto *lit = static_cast<LiteralString *>(body);
  937|    630|                    if (lit->tokenKind == LiteralString::BLOCK) {
  ------------------
  |  Branch (937:25): [True: 0, False: 630]
  ------------------
  938|      0|                        throw StaticError(lit->location,
  939|      0|                                          "Cannot use text blocks in import statements.");
  940|      0|                    }
  941|    630|                    return alloc->make<Importbin>(span(begin, body), begin.fodder, lit);
  942|    630|                } else {
  943|     74|                    std::stringstream ss;
  944|     74|                    ss << "computed imports are not allowed.";
  945|     74|                    throw StaticError(body->location, ss.str());
  946|     74|                }
  947|    704|            }
  948|       |
  949|  1.51M|            case Token::LOCAL: {
  ------------------
  |  Branch (949:13): [True: 1.51M, False: 31.8M]
  ------------------
  950|  1.51M|                pop();
  951|  1.51M|                Local::Binds binds;
  952|  1.59M|                do {
  953|  1.59M|                    Token delim = parseBind(binds, current_depth + 1);
  954|  1.59M|                    if (delim.kind != Token::SEMICOLON && delim.kind != Token::COMMA) {
  ------------------
  |  Branch (954:25): [True: 83.2k, False: 1.51M]
  |  Branch (954:59): [True: 11, False: 83.2k]
  ------------------
  955|     11|                        std::stringstream ss;
  956|     11|                        ss << "expected , or ; but got " << delim;
  957|     11|                        throw StaticError(delim.location, ss.str());
  958|     11|                    }
  959|  1.59M|                    if (delim.kind == Token::SEMICOLON)
  ------------------
  |  Branch (959:25): [True: 1.51M, False: 83.9k]
  ------------------
  960|  1.51M|                        break;
  961|  1.59M|                } while (true);
  ------------------
  |  Branch (961:26): [True: 83.2k, Folded]
  ------------------
  962|  1.51M|                AST *body = parse(MAX_PRECEDENCE, current_depth + 1);
  963|  1.51M|                return alloc->make<Local>(span(begin, body), begin.fodder, binds, body);
  964|  1.51M|            }
  965|       |
  966|  29.0M|            default:
  ------------------
  |  Branch (966:13): [True: 29.0M, False: 4.34M]
  ------------------
  967|  29.0M|            return nullptr;
  968|  33.3M|        }
  969|  33.3M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser3popEv:
  111|  86.4M|    {
  112|  86.4M|        Token tok = peek();
  113|  86.4M|        tokens.pop_front();
  114|  86.4M|        return tok;
  115|  86.4M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser9popExpectENS0_5Token4KindEPKc:
  136|  13.5M|    {
  137|  13.5M|        Token tok = pop();
  138|  13.5M|        if (tok.kind != k) {
  ------------------
  |  Branch (138:13): [True: 198, False: 13.5M]
  ------------------
  139|    198|            std::stringstream ss;
  140|    198|            ss << "expected token " << k << " but got " << tok;
  141|    198|            throw StaticError(tok.location, ss.str());
  142|    198|        }
  143|  13.5M|        if (data != nullptr && tok.data != data) {
  ------------------
  |  Branch (143:13): [True: 1.64M, False: 11.9M]
  |  Branch (143:32): [True: 15, False: 1.64M]
  ------------------
  144|     15|            std::stringstream ss;
  145|     15|            ss << "expected operator " << data << " but got " << tok.data;
  146|     15|            throw StaticError(tok.location, ss.str());
  147|     15|        }
  148|  13.5M|        return tok;
  149|  13.5M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14spanERKNS0_5TokenEPNS0_3ASTE:
   94|  10.1M|{
   95|  10.1M|    return LocationRange(begin.location.file, begin.location.begin, end->location.end);
   96|  10.1M|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser11parseParamsERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERbRNS3_6vectorINS0_13FodderElementENS7_ISE_EEEEj:
  218|  1.38M|    {
  219|  1.38M|        ArgParams params;
  220|  1.38M|        Token paren_r = parseArgs(params, element_kind, got_comma, current_depth);
  221|       |
  222|       |        // Check they're all identifiers
  223|       |        // parseArgs returns f(x) with x as an expression.  Convert it here.
  224|  2.70M|        for (auto &p : params) {
  ------------------
  |  Branch (224:22): [True: 2.70M, False: 1.38M]
  ------------------
  225|  2.70M|            if (p.id == nullptr) {
  ------------------
  |  Branch (225:17): [True: 2.57M, False: 131k]
  ------------------
  226|  2.57M|                if (p.expr->type != AST_VAR) {
  ------------------
  |  Branch (226:21): [True: 0, False: 2.57M]
  ------------------
  227|      0|                    throw StaticError(p.expr->location, "could not parse parameter here.");
  228|      0|                }
  229|  2.57M|                auto *pv = static_cast<Var *>(p.expr);
  230|  2.57M|                p.id = pv->id;
  231|  2.57M|                p.idFodder = pv->openFodder;
  232|  2.57M|                p.expr = nullptr;
  233|  2.57M|            }
  234|  2.70M|        }
  235|       |
  236|  1.38M|        close_fodder = paren_r.fodder;
  237|       |
  238|  1.38M|        return params;
  239|  1.38M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser9parseArgsERNSt3__16vectorINS0_8ArgParamENS3_9allocatorIS5_EEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS6_IcEEEERbj:
  167|  6.45M|    {
  168|  6.45M|        got_comma = false;
  169|  6.45M|        bool first = true;
  170|  17.7M|        do {
  171|  17.7M|            Token next = peek();
  172|  17.7M|            if (next.kind == Token::PAREN_R) {
  ------------------
  |  Branch (172:17): [True: 6.44M, False: 11.3M]
  ------------------
  173|       |                // got_comma can be true or false here.
  174|  6.44M|                return pop();
  175|  6.44M|            }
  176|  11.3M|            if (!first && !got_comma) {
  ------------------
  |  Branch (176:17): [True: 4.88M, False: 6.44M]
  |  Branch (176:27): [True: 66, False: 4.88M]
  ------------------
  177|     66|                std::stringstream ss;
  178|     66|                ss << "expected a comma before next " << element_kind << ".";
  179|     66|                throw StaticError(next.location, ss.str());
  180|     66|            }
  181|       |            // Either id=expr or id or expr, but note that expr could be id==1 so this needs
  182|       |            // look-ahead.
  183|  11.3M|            Fodder id_fodder;
  184|  11.3M|            const Identifier *id = nullptr;
  185|  11.3M|            Fodder eq_fodder;
  186|  11.3M|            if (peek().kind == Token::IDENTIFIER) {
  ------------------
  |  Branch (186:17): [True: 9.60M, False: 1.73M]
  ------------------
  187|  9.60M|                Token maybe_eq = doublePeek();
  188|  9.60M|                if (maybe_eq.kind == Token::OPERATOR && maybe_eq.data == "=") {
  ------------------
  |  Branch (188:21): [True: 995k, False: 8.60M]
  |  Branch (188:57): [True: 151k, False: 844k]
  ------------------
  189|   151k|                    id_fodder = peek().fodder;
  190|   151k|                    id = alloc->makeIdentifier(peek().data32());
  191|   151k|                    eq_fodder = maybe_eq.fodder;
  192|   151k|                    pop();  // id
  193|   151k|                    pop();  // eq
  194|   151k|                }
  195|  9.60M|            }
  196|  11.3M|            AST *expr = parse(MAX_PRECEDENCE, current_depth + 1);
  197|  11.3M|            got_comma = false;
  198|  11.3M|            first = false;
  199|  11.3M|            Fodder comma_fodder;
  200|  11.3M|            if (peek().kind == Token::COMMA) {
  ------------------
  |  Branch (200:17): [True: 4.88M, False: 6.44M]
  ------------------
  201|  4.88M|                Token comma = pop();
  202|  4.88M|                comma_fodder = comma.fodder;
  203|  4.88M|                got_comma = true;
  204|  4.88M|            }
  205|  11.3M|            args.emplace_back(id_fodder, id, eq_fodder, expr, comma_fodder);
  206|  11.3M|        } while (true);
  ------------------
  |  Branch (206:18): [True: 11.3M, Folded]
  ------------------
  207|  6.45M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser10doublePeekEv:
  129|  9.60M|    {
  130|  9.60M|        Tokens::iterator it = tokens.begin();  // First one.
  131|  9.60M|        it++;                                  // Now pointing at the second one.
  132|  9.60M|        return *(it);
  133|  9.60M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser9parseBindERNSt3__16vectorINS0_5Local4BindENS3_9allocatorIS6_EEEEj:
  248|  1.59M|    {
  249|  1.59M|        Token var_id = popExpect(Token::IDENTIFIER);
  250|  1.59M|        auto *id = alloc->makeIdentifier(var_id.data32());
  251|  1.59M|        for (const auto &bind : binds) {
  ------------------
  |  Branch (251:31): [True: 225k, False: 1.59M]
  ------------------
  252|   225k|            if (bind.var == id)
  ------------------
  |  Branch (252:17): [True: 6, False: 225k]
  ------------------
  253|      6|                throw StaticError(var_id.location, "duplicate local var: " + var_id.data);
  254|   225k|        }
  255|  1.59M|        bool is_function = false;
  256|  1.59M|        ArgParams params;
  257|  1.59M|        bool trailing_comma = false;
  258|  1.59M|        Fodder fodder_l, fodder_r;
  259|  1.59M|        if (peek().kind == Token::PAREN_L) {
  ------------------
  |  Branch (259:13): [True: 462k, False: 1.13M]
  ------------------
  260|   462k|            Token paren_l = pop();
  261|   462k|            fodder_l = paren_l.fodder;
  262|   462k|            params = parseParams("function parameter", trailing_comma, fodder_r, current_depth);
  263|   462k|            is_function = true;
  264|   462k|        }
  265|  1.59M|        Token eq = popExpect(Token::OPERATOR, "=");
  266|  1.59M|        AST *body = parse(MAX_PRECEDENCE, current_depth + 1);
  267|  1.59M|        Token delim = pop();
  268|  1.59M|        binds.emplace_back(var_id.fodder,
  269|  1.59M|                           id,
  270|  1.59M|                           eq.fodder,
  271|  1.59M|                           body,
  272|  1.59M|                           is_function,
  273|  1.59M|                           fodder_l,
  274|  1.59M|                           params,
  275|  1.59M|                           trailing_comma,
  276|  1.59M|                           fodder_r,
  277|  1.59M|                           delim.fodder);
  278|  1.59M|        return delim;
  279|  1.59M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser28parseTerminalBracketsOrUnaryEj:
  627|  29.0M|    {
  628|  29.0M|        if (current_depth >= MAX_PARSER_DEPTH) {
  ------------------
  |  Branch (628:13): [True: 0, False: 29.0M]
  ------------------
  629|      0|            throw StaticError(peek().location, "Exceeded maximum parse depth limit.");
  630|      0|        }
  631|       |
  632|  29.0M|        Token tok = pop();
  633|  29.0M|        switch (tok.kind) {
  ------------------
  |  Branch (633:17): [True: 29.0M, False: 0]
  ------------------
  634|      0|            case Token::ASSERT:
  ------------------
  |  Branch (634:13): [True: 0, False: 29.0M]
  ------------------
  635|      9|            case Token::BRACE_R:
  ------------------
  |  Branch (635:13): [True: 9, False: 29.0M]
  ------------------
  636|     19|            case Token::BRACKET_R:
  ------------------
  |  Branch (636:13): [True: 10, False: 29.0M]
  ------------------
  637|     51|            case Token::COMMA:
  ------------------
  |  Branch (637:13): [True: 32, False: 29.0M]
  ------------------
  638|     67|            case Token::DOT:
  ------------------
  |  Branch (638:13): [True: 16, False: 29.0M]
  ------------------
  639|     68|            case Token::ELSE:
  ------------------
  |  Branch (639:13): [True: 1, False: 29.0M]
  ------------------
  640|     68|            case Token::ERROR:
  ------------------
  |  Branch (640:13): [True: 0, False: 29.0M]
  ------------------
  641|     69|            case Token::FOR:
  ------------------
  |  Branch (641:13): [True: 1, False: 29.0M]
  ------------------
  642|     69|            case Token::FUNCTION:
  ------------------
  |  Branch (642:13): [True: 0, False: 29.0M]
  ------------------
  643|     69|            case Token::IF:
  ------------------
  |  Branch (643:13): [True: 0, False: 29.0M]
  ------------------
  644|     73|            case Token::IN:
  ------------------
  |  Branch (644:13): [True: 4, False: 29.0M]
  ------------------
  645|     73|            case Token::IMPORT:
  ------------------
  |  Branch (645:13): [True: 0, False: 29.0M]
  ------------------
  646|     73|            case Token::IMPORTSTR:
  ------------------
  |  Branch (646:13): [True: 0, False: 29.0M]
  ------------------
  647|     73|            case Token::IMPORTBIN:
  ------------------
  |  Branch (647:13): [True: 0, False: 29.0M]
  ------------------
  648|     73|            case Token::LOCAL:
  ------------------
  |  Branch (648:13): [True: 0, False: 29.0M]
  ------------------
  649|     84|            case Token::PAREN_R:
  ------------------
  |  Branch (649:13): [True: 11, False: 29.0M]
  ------------------
  650|     93|            case Token::SEMICOLON:
  ------------------
  |  Branch (650:13): [True: 9, False: 29.0M]
  ------------------
  651|     94|            case Token::TAILSTRICT:
  ------------------
  |  Branch (651:13): [True: 1, False: 29.0M]
  ------------------
  652|     95|            case Token::THEN: throw unexpected(tok, "parsing terminal");
  ------------------
  |  Branch (652:13): [True: 1, False: 29.0M]
  ------------------
  653|       |
  654|    598|            case Token::END_OF_FILE: throw StaticError(tok.location, "unexpected end of file.");
  ------------------
  |  Branch (654:13): [True: 598, False: 29.0M]
  ------------------
  655|       |
  656|   422k|            case Token::OPERATOR: {
  ------------------
  |  Branch (656:13): [True: 422k, False: 28.6M]
  ------------------
  657|   422k|                UnaryOp uop;
  658|   422k|                if (!op_is_unary(tok.data, uop)) {
  ------------------
  |  Branch (658:21): [True: 153, False: 421k]
  ------------------
  659|    153|                    std::stringstream ss;
  660|    153|                    ss << "not a unary operator: " << tok.data;
  661|    153|                    throw StaticError(tok.location, ss.str());
  662|    153|                }
  663|   421k|                AST *expr = parse(UNARY_PRECEDENCE, current_depth + 1);
  664|   421k|                return alloc->make<Unary>(span(tok, expr), tok.fodder, uop, expr);
  665|   422k|            }
  666|   309k|            case Token::BRACE_L: {
  ------------------
  |  Branch (666:13): [True: 309k, False: 28.7M]
  ------------------
  667|   309k|                AST *obj;
  668|   309k|                parseObjectRemainder(obj, tok, current_depth + 1);
  669|   309k|                return obj;
  670|   422k|            }
  671|       |
  672|   877k|            case Token::BRACKET_L: {
  ------------------
  |  Branch (672:13): [True: 877k, False: 28.1M]
  ------------------
  673|   877k|                Token next = peek();
  674|   877k|                if (next.kind == Token::BRACKET_R) {
  ------------------
  |  Branch (674:21): [True: 142k, False: 734k]
  ------------------
  675|   142k|                    Token bracket_r = pop();
  676|   142k|                    return alloc->make<Array>(
  677|   142k|                        span(tok, next), tok.fodder, Array::Elements{}, false, bracket_r.fodder);
  678|   142k|                }
  679|   734k|                AST *first = parse(MAX_PRECEDENCE, current_depth + 1);
  680|   734k|                bool got_comma = false;
  681|   734k|                Fodder comma_fodder;
  682|   734k|                next = peek();
  683|   734k|                if (!got_comma && next.kind == Token::COMMA) {
  ------------------
  |  Branch (683:21): [True: 732k, False: 1.98k]
  |  Branch (683:35): [True: 112k, False: 619k]
  ------------------
  684|   112k|                    Token comma = pop();
  685|   112k|                    comma_fodder = comma.fodder;
  686|   112k|                    next = peek();
  687|   112k|                    got_comma = true;
  688|   112k|                }
  689|       |
  690|   734k|                if (next.kind == Token::FOR) {
  ------------------
  |  Branch (690:21): [True: 200k, False: 533k]
  ------------------
  691|       |                    // It's a comprehension
  692|   200k|                    Token for_token = pop();
  693|   200k|                    std::vector<ComprehensionSpec> specs;
  694|   200k|                    Token last = parseComprehensionSpecs(Token::BRACKET_R, for_token.fodder, specs, current_depth + 1);
  695|   200k|                    return alloc->make<ArrayComprehension>(span(tok, last),
  696|   200k|                                                           tok.fodder,
  697|   200k|                                                           first,
  698|   200k|                                                           comma_fodder,
  699|   200k|                                                           got_comma,
  700|   200k|                                                           specs,
  701|   200k|                                                           last.fodder);
  702|   200k|                }
  703|       |
  704|       |                // Not a comprehension: It can have more elements.
  705|   533k|                Array::Elements elements;
  706|   533k|                elements.emplace_back(first, comma_fodder);
  707|  1.88M|                do {
  708|  1.88M|                    if (next.kind == Token::BRACKET_R) {
  ------------------
  |  Branch (708:25): [True: 530k, False: 1.35M]
  ------------------
  709|   530k|                        Token bracket_r = pop();
  710|   530k|                        return alloc->make<Array>(
  711|   530k|                            span(tok, next), tok.fodder, elements, got_comma, bracket_r.fodder);
  712|   530k|                    }
  713|  1.35M|                    if (!got_comma) {
  ------------------
  |  Branch (713:25): [True: 200, False: 1.35M]
  ------------------
  714|    200|                        std::stringstream ss;
  715|    200|                        ss << "expected a comma before next array element.";
  716|    200|                        throw StaticError(next.location, ss.str());
  717|    200|                    }
  718|  1.35M|                    AST *expr = parse(MAX_PRECEDENCE, current_depth + 1);
  719|  1.35M|                    comma_fodder.clear();
  720|  1.35M|                    got_comma = false;
  721|  1.35M|                    next = peek();
  722|  1.35M|                    if (next.kind == Token::COMMA) {
  ------------------
  |  Branch (722:25): [True: 1.25M, False: 101k]
  ------------------
  723|  1.25M|                        Token comma = pop();
  724|  1.25M|                        comma_fodder = comma.fodder;
  725|  1.25M|                        next = peek();
  726|  1.25M|                        got_comma = true;
  727|  1.25M|                    }
  728|  1.35M|                    elements.emplace_back(expr, comma_fodder);
  729|  1.35M|                } while (true);
  ------------------
  |  Branch (729:26): [True: 1.35M, Folded]
  ------------------
  730|   533k|            }
  731|       |
  732|   316k|            case Token::PAREN_L: {
  ------------------
  |  Branch (732:13): [True: 313k, False: 28.7M]
  ------------------
  733|   316k|                auto *inner = parse(MAX_PRECEDENCE, current_depth + 1);
  734|   316k|                Token close = popExpect(Token::PAREN_R);
  735|   316k|                return alloc->make<Parens>(span(tok, close), tok.fodder, inner, close.fodder);
  736|   533k|            }
  737|       |
  738|       |            // Literals
  739|  3.82M|            case Token::NUMBER: return alloc->make<LiteralNumber>(span(tok), tok.fodder, tok.data);
  ------------------
  |  Branch (739:13): [True: 3.82M, False: 25.2M]
  ------------------
  740|       |
  741|  2.90M|            case Token::STRING_SINGLE:
  ------------------
  |  Branch (741:13): [True: 2.90M, False: 26.1M]
  ------------------
  742|  2.90M|                return alloc->make<LiteralString>(
  743|  2.90M|                    span(tok), tok.fodder, tok.data32(), LiteralString::SINGLE, "", "");
  744|  93.9k|            case Token::STRING_DOUBLE:
  ------------------
  |  Branch (744:13): [True: 93.9k, False: 28.9M]
  ------------------
  745|  93.9k|                return alloc->make<LiteralString>(
  746|  93.9k|                    span(tok), tok.fodder, tok.data32(), LiteralString::DOUBLE, "", "");
  747|  1.63k|            case Token::STRING_BLOCK:
  ------------------
  |  Branch (747:13): [True: 1.63k, False: 29.0M]
  ------------------
  748|  1.63k|                return alloc->make<LiteralString>(span(tok),
  749|  1.63k|                                                  tok.fodder,
  750|  1.63k|                                                  tok.data32(),
  751|  1.63k|                                                  LiteralString::BLOCK,
  752|  1.63k|                                                  tok.stringBlockIndent,
  753|  1.63k|                                                  tok.stringBlockTermIndent);
  754|    651|            case Token::VERBATIM_STRING_SINGLE:
  ------------------
  |  Branch (754:13): [True: 651, False: 29.0M]
  ------------------
  755|    651|                return alloc->make<LiteralString>(
  756|    651|                    span(tok), tok.fodder, tok.data32(), LiteralString::VERBATIM_SINGLE, "", "");
  757|    452|            case Token::VERBATIM_STRING_DOUBLE:
  ------------------
  |  Branch (757:13): [True: 452, False: 29.0M]
  ------------------
  758|    452|                return alloc->make<LiteralString>(
  759|    452|                    span(tok), tok.fodder, tok.data32(), LiteralString::VERBATIM_DOUBLE, "", "");
  760|       |
  761|   306k|            case Token::FALSE: return alloc->make<LiteralBoolean>(span(tok), tok.fodder, false);
  ------------------
  |  Branch (761:13): [True: 306k, False: 28.7M]
  ------------------
  762|       |
  763|   225k|            case Token::TRUE: return alloc->make<LiteralBoolean>(span(tok), tok.fodder, true);
  ------------------
  |  Branch (763:13): [True: 225k, False: 28.7M]
  ------------------
  764|       |
  765|   113k|            case Token::NULL_LIT: return alloc->make<LiteralNull>(span(tok), tok.fodder);
  ------------------
  |  Branch (765:13): [True: 113k, False: 28.9M]
  ------------------
  766|       |
  767|       |            // Variables
  768|  33.3k|            case Token::DOLLAR: return alloc->make<Dollar>(span(tok), tok.fodder);
  ------------------
  |  Branch (768:13): [True: 33.3k, False: 28.9M]
  ------------------
  769|       |
  770|  19.5M|            case Token::IDENTIFIER:
  ------------------
  |  Branch (770:13): [True: 19.5M, False: 9.47M]
  ------------------
  771|  19.5M|                return alloc->make<Var>(span(tok), tok.fodder, alloc->makeIdentifier(tok.data32()));
  772|       |
  773|  43.9k|            case Token::SELF: return alloc->make<Self>(span(tok), tok.fodder);
  ------------------
  |  Branch (773:13): [True: 43.9k, False: 28.9M]
  ------------------
  774|       |
  775|  1.10k|            case Token::SUPER: {
  ------------------
  |  Branch (775:13): [True: 1.10k, False: 29.0M]
  ------------------
  776|  1.10k|                Token next = pop();
  777|  1.10k|                AST *index = nullptr;
  778|  1.10k|                const Identifier *id = nullptr;
  779|  1.10k|                Fodder id_fodder;
  780|  1.10k|                switch (next.kind) {
  781|    832|                    case Token::DOT: {
  ------------------
  |  Branch (781:21): [True: 832, False: 271]
  ------------------
  782|    832|                        Token field_id = popExpect(Token::IDENTIFIER);
  783|    832|                        id_fodder = field_id.fodder;
  784|    832|                        id = alloc->makeIdentifier(field_id.data32());
  785|    832|                    } break;
  786|    269|                    case Token::BRACKET_L: {
  ------------------
  |  Branch (786:21): [True: 269, False: 834]
  ------------------
  787|    269|                        index = parse(MAX_PRECEDENCE, current_depth + 1);
  788|    269|                        Token bracket_r = popExpect(Token::BRACKET_R);
  789|    269|                        id_fodder = bracket_r.fodder;  // Not id_fodder, but use the same var.
  790|    269|                    } break;
  791|      2|                    default: throw StaticError(tok.location, "expected . or [ after super.");
  ------------------
  |  Branch (791:21): [True: 2, False: 1.10k]
  ------------------
  792|  1.10k|                }
  793|    900|                return alloc->make<SuperIndex>(
  794|    900|                    span(tok), tok.fodder, next.fodder, index, id_fodder, id);
  795|  1.10k|            }
  796|  29.0M|        }
  797|       |
  798|      0|        std::cerr << "INTERNAL ERROR: Unknown tok kind: " << tok.kind << std::endl;
  799|      0|        std::abort();
  800|      0|        return nullptr;  // Quiet, compiler.
  801|  29.0M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser10unexpectedERKNS0_5TokenERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  104|    297|    {
  105|    297|        std::stringstream ss;
  106|    297|        ss << "unexpected: " << tok.kind << " while " << while_;
  107|    297|        return StaticError(tok.location, ss.str());
  108|    297|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111op_is_unaryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERNS0_7UnaryOpE:
   66|   422k|{
   67|   422k|    auto it = unary_map.find(op);
   68|   422k|    if (it == unary_map.end())
  ------------------
  |  Branch (68:9): [True: 153, False: 421k]
  ------------------
   69|    153|        return false;
   70|   421k|    uop = it->second;
   71|   421k|    return true;
   72|   422k|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser20parseObjectRemainderERPNS0_3ASTERKNS0_5TokenEj:
  289|   397k|    {
  290|   397k|        if (current_depth >= MAX_PARSER_DEPTH) {
  ------------------
  |  Branch (290:13): [True: 3, False: 397k]
  ------------------
  291|      3|            throw StaticError(peek().location, "Exceeded maximum parse depth limit.");
  292|      3|        }
  293|       |
  294|   397k|        ObjectFields fields;
  295|   397k|        std::set<std::string> literal_fields;  // For duplicate fields detection.
  296|   397k|        std::set<const Identifier *> binds;    // For duplicate locals detection.
  297|       |
  298|   397k|        bool got_comma = false;
  299|   397k|        bool first = true;
  300|   397k|        Token next = pop();
  301|       |
  302|  2.03M|        do {
  303|  2.03M|            if (next.kind == Token::BRACE_R) {
  ------------------
  |  Branch (303:17): [True: 362k, False: 1.66M]
  ------------------
  304|   362k|                obj = alloc->make<Object>(
  305|   362k|                    span(tok, next), tok.fodder, fields, got_comma, next.fodder);
  306|   362k|                return next;
  307|       |
  308|  1.66M|            } else if (next.kind == Token::FOR) {
  ------------------
  |  Branch (308:24): [True: 28.8k, False: 1.64M]
  ------------------
  309|       |                // It's a comprehension
  310|  28.8k|                unsigned num_fields = 0;
  311|  28.8k|                unsigned num_asserts = 0;
  312|  28.8k|                const ObjectField *field_ptr = nullptr;
  313|  29.1k|                for (const auto &field : fields) {
  ------------------
  |  Branch (313:40): [True: 29.1k, False: 28.8k]
  ------------------
  314|  29.1k|                    if (field.kind == ObjectField::LOCAL)
  ------------------
  |  Branch (314:25): [True: 1, False: 29.1k]
  ------------------
  315|      1|                        continue;
  316|  29.1k|                    if (field.kind == ObjectField::ASSERT) {
  ------------------
  |  Branch (316:25): [True: 278, False: 28.9k]
  ------------------
  317|    278|                        num_asserts++;
  318|    278|                        continue;
  319|    278|                    }
  320|  28.9k|                    field_ptr = &field;
  321|  28.9k|                    num_fields++;
  322|  28.9k|                }
  323|  28.8k|                if (num_asserts > 0) {
  ------------------
  |  Branch (323:21): [True: 8, False: 28.8k]
  ------------------
  324|      8|                    auto msg = "object comprehension cannot have asserts.";
  325|      8|                    throw StaticError(next.location, msg);
  326|      8|                }
  327|  28.8k|                if (num_fields != 1) {
  ------------------
  |  Branch (327:21): [True: 5, False: 28.8k]
  ------------------
  328|      5|                    auto msg = "object comprehension can only have one field.";
  329|      5|                    throw StaticError(next.location, msg);
  330|      5|                }
  331|  28.8k|                const ObjectField &field = *field_ptr;
  332|       |
  333|  28.8k|                if (field.hide != ObjectField::INHERIT) {
  ------------------
  |  Branch (333:21): [True: 1, False: 28.8k]
  ------------------
  334|      1|                    auto msg = "object comprehensions cannot have hidden fields.";
  335|      1|                    throw StaticError(next.location, msg);
  336|      1|                }
  337|       |
  338|  28.8k|                if (field.kind != ObjectField::FIELD_EXPR) {
  ------------------
  |  Branch (338:21): [True: 1, False: 28.8k]
  ------------------
  339|      1|                    auto msg = "object comprehensions can only have [e] fields.";
  340|      1|                    throw StaticError(next.location, msg);
  341|      1|                }
  342|       |
  343|  28.8k|                std::vector<ComprehensionSpec> specs;
  344|  28.8k|                Token last = parseComprehensionSpecs(Token::BRACE_R, next.fodder, specs, current_depth + 1);
  345|  28.8k|                obj = alloc->make<ObjectComprehension>(
  346|  28.8k|                    span(tok, last), tok.fodder, fields, got_comma, specs, last.fodder);
  347|       |
  348|  28.8k|                return last;
  349|  28.8k|            }
  350|       |
  351|  1.64M|            if (!got_comma && !first)
  ------------------
  |  Branch (351:17): [True: 362k, False: 1.27M]
  |  Branch (351:31): [True: 76, False: 362k]
  ------------------
  352|     76|                throw StaticError(next.location, "expected a comma before next field.");
  353|       |
  354|  1.64M|            first = false;
  355|  1.64M|            got_comma = false;
  356|       |
  357|  1.64M|            switch (next.kind) {
  358|  33.1k|                case Token::BRACKET_L:
  ------------------
  |  Branch (358:17): [True: 33.1k, False: 1.60M]
  ------------------
  359|  1.45M|                case Token::IDENTIFIER:
  ------------------
  |  Branch (359:17): [True: 1.41M, False: 222k]
  ------------------
  360|  1.51M|                case Token::STRING_DOUBLE:
  ------------------
  |  Branch (360:17): [True: 61.5k, False: 1.57M]
  ------------------
  361|  1.53M|                case Token::STRING_SINGLE:
  ------------------
  |  Branch (361:17): [True: 25.3k, False: 1.61M]
  ------------------
  362|  1.54M|                case Token::STRING_BLOCK:
  ------------------
  |  Branch (362:17): [True: 2.40k, False: 1.63M]
  ------------------
  363|  1.54M|                case Token::VERBATIM_STRING_DOUBLE:
  ------------------
  |  Branch (363:17): [True: 831, False: 1.64M]
  ------------------
  364|  1.54M|                case Token::VERBATIM_STRING_SINGLE: {
  ------------------
  |  Branch (364:17): [True: 96, False: 1.64M]
  ------------------
  365|  1.54M|                    ObjectField::Kind kind;
  366|  1.54M|                    AST *expr1 = nullptr;
  367|  1.54M|                    const Identifier *id = nullptr;
  368|  1.54M|                    Fodder fodder1, fodder2;
  369|  1.54M|                    LocationRange idLocation;
  370|  1.54M|                    if (next.kind == Token::IDENTIFIER) {
  ------------------
  |  Branch (370:25): [True: 1.41M, False: 123k]
  ------------------
  371|  1.41M|                        fodder1 = next.fodder;
  372|  1.41M|                        kind = ObjectField::FIELD_ID;
  373|  1.41M|                        id = alloc->makeIdentifier(next.data32());
  374|  1.41M|                        idLocation = next.location;
  375|  1.41M|                    } else if (next.kind == Token::STRING_DOUBLE) {
  ------------------
  |  Branch (375:32): [True: 61.5k, False: 61.8k]
  ------------------
  376|  61.5k|                        kind = ObjectField::FIELD_STR;
  377|  61.5k|                        expr1 = alloc->make<LiteralString>(next.location,
  378|  61.5k|                                                           next.fodder,
  379|  61.5k|                                                           next.data32(),
  380|  61.5k|                                                           LiteralString::DOUBLE,
  381|  61.5k|                                                           "",
  382|  61.5k|                                                           "");
  383|  61.8k|                    } else if (next.kind == Token::STRING_SINGLE) {
  ------------------
  |  Branch (383:32): [True: 25.3k, False: 36.5k]
  ------------------
  384|  25.3k|                        kind = ObjectField::FIELD_STR;
  385|  25.3k|                        expr1 = alloc->make<LiteralString>(next.location,
  386|  25.3k|                                                           next.fodder,
  387|  25.3k|                                                           next.data32(),
  388|  25.3k|                                                           LiteralString::SINGLE,
  389|  25.3k|                                                           "",
  390|  25.3k|                                                           "");
  391|  36.5k|                    } else if (next.kind == Token::STRING_BLOCK) {
  ------------------
  |  Branch (391:32): [True: 2.40k, False: 34.1k]
  ------------------
  392|  2.40k|                        kind = ObjectField::FIELD_STR;
  393|  2.40k|                        expr1 = alloc->make<LiteralString>(next.location,
  394|  2.40k|                                                           next.fodder,
  395|  2.40k|                                                           next.data32(),
  396|  2.40k|                                                           LiteralString::BLOCK,
  397|  2.40k|                                                           next.stringBlockIndent,
  398|  2.40k|                                                           next.stringBlockTermIndent);
  399|  34.1k|                    } else if (next.kind == Token::VERBATIM_STRING_SINGLE) {
  ------------------
  |  Branch (399:32): [True: 96, False: 34.0k]
  ------------------
  400|     96|                        kind = ObjectField::FIELD_STR;
  401|     96|                        expr1 = alloc->make<LiteralString>(next.location,
  402|     96|                                                           next.fodder,
  403|     96|                                                           next.data32(),
  404|     96|                                                           LiteralString::VERBATIM_SINGLE,
  405|     96|                                                           "",
  406|     96|                                                           "");
  407|  34.0k|                    } else if (next.kind == Token::VERBATIM_STRING_DOUBLE) {
  ------------------
  |  Branch (407:32): [True: 831, False: 33.1k]
  ------------------
  408|    831|                        kind = ObjectField::FIELD_STR;
  409|    831|                        expr1 = alloc->make<LiteralString>(next.location,
  410|    831|                                                           next.fodder,
  411|    831|                                                           next.data32(),
  412|    831|                                                           LiteralString::VERBATIM_DOUBLE,
  413|    831|                                                           "",
  414|    831|                                                           "");
  415|  33.1k|                    } else {
  416|  33.1k|                        kind = ObjectField::FIELD_EXPR;
  417|  33.1k|                        fodder1 = next.fodder;
  418|  33.1k|                        expr1 = parse(MAX_PRECEDENCE, current_depth + 1);
  419|  33.1k|                        Token bracket_r = popExpect(Token::BRACKET_R);
  420|  33.1k|                        fodder2 = bracket_r.fodder;
  421|  33.1k|                    }
  422|       |
  423|  1.54M|                    bool is_method = false;
  424|  1.54M|                    bool meth_comma = false;
  425|  1.54M|                    ArgParams params;
  426|  1.54M|                    Fodder fodder_l;
  427|  1.54M|                    Fodder fodder_r;
  428|  1.54M|                    if (peek().kind == Token::PAREN_L) {
  ------------------
  |  Branch (428:25): [True: 786k, False: 755k]
  ------------------
  429|   786k|                        Token paren_l = pop();
  430|   786k|                        fodder_l = paren_l.fodder;
  431|   786k|                        params = parseParams("method parameter", meth_comma, fodder_r, current_depth);
  432|   786k|                        is_method = true;
  433|   786k|                    }
  434|       |
  435|  1.54M|                    bool plus_sugar = false;
  436|       |
  437|  1.54M|                    Token op = popExpect(Token::OPERATOR);
  438|  1.54M|                    const char *od = op.data.c_str();
  439|  1.54M|                    if (*od == '+') {
  ------------------
  |  Branch (439:25): [True: 15.3k, False: 1.52M]
  ------------------
  440|  15.3k|                        plus_sugar = true;
  441|  15.3k|                        od++;
  442|  15.3k|                    }
  443|  1.54M|                    unsigned colons = 0;
  444|  3.86M|                    for (; *od != '\0'; ++od) {
  ------------------
  |  Branch (444:28): [True: 2.32M, False: 1.54M]
  ------------------
  445|  2.32M|                        if (*od != ':') {
  ------------------
  |  Branch (445:29): [True: 11, False: 2.32M]
  ------------------
  446|     11|                            throw StaticError(
  447|     11|                                next.location,
  448|     11|                                "expected one of :, ::, :::, +:, +::, +:::, got: " + op.data);
  449|     11|                        }
  450|  2.32M|                        ++colons;
  451|  2.32M|                    }
  452|  1.54M|                    ObjectField::Hide field_hide;
  453|  1.54M|                    switch (colons) {
  454|   758k|                        case 1: field_hide = ObjectField::INHERIT; break;
  ------------------
  |  Branch (454:25): [True: 758k, False: 783k]
  ------------------
  455|       |
  456|   780k|                        case 2: field_hide = ObjectField::HIDDEN; break;
  ------------------
  |  Branch (456:25): [True: 780k, False: 761k]
  ------------------
  457|       |
  458|      7|                        case 3: field_hide = ObjectField::VISIBLE; break;
  ------------------
  |  Branch (458:25): [True: 7, False: 1.54M]
  ------------------
  459|       |
  460|     10|                        default:
  ------------------
  |  Branch (460:25): [True: 10, False: 1.54M]
  ------------------
  461|     10|                            throw StaticError(
  462|     10|                                next.location,
  463|     10|                                "expected one of :, ::, :::, +:, +::, +:::, got: " + op.data);
  464|  1.54M|                    }
  465|       |
  466|       |                    // Basic checks for invalid Jsonnet code.
  467|  1.53M|                    if (is_method && plus_sugar) {
  ------------------
  |  Branch (467:25): [True: 784k, False: 754k]
  |  Branch (467:38): [True: 1, False: 784k]
  ------------------
  468|      1|                        throw StaticError(next.location,
  469|      1|                                          "cannot use +: syntax sugar in a method: " + next.data);
  470|      1|                    }
  471|  1.53M|                    if (kind != ObjectField::FIELD_EXPR) {
  ------------------
  |  Branch (471:25): [True: 1.50M, False: 32.2k]
  ------------------
  472|  1.50M|                        if (!literal_fields.insert(next.data).second) {
  ------------------
  |  Branch (472:29): [True: 9, False: 1.50M]
  ------------------
  473|      9|                            throw StaticError(next.location, "duplicate field: " + next.data);
  474|      9|                        }
  475|  1.50M|                    }
  476|       |
  477|  1.53M|                    AST *body = parse(MAX_PRECEDENCE, current_depth + 1);
  478|       |
  479|  1.53M|                    Fodder comma_fodder;
  480|  1.53M|                    next = pop();
  481|  1.53M|                    if (next.kind == Token::COMMA) {
  ------------------
  |  Branch (481:25): [True: 1.27M, False: 268k]
  ------------------
  482|  1.27M|                        comma_fodder = next.fodder;
  483|  1.27M|                        next = pop();
  484|  1.27M|                        got_comma = true;
  485|  1.27M|                    }
  486|  1.53M|                    fields.emplace_back(kind,
  487|  1.53M|                                        fodder1,
  488|  1.53M|                                        fodder2,
  489|  1.53M|                                        fodder_l,
  490|  1.53M|                                        fodder_r,
  491|  1.53M|                                        field_hide,
  492|  1.53M|                                        plus_sugar,
  493|  1.53M|                                        is_method,
  494|  1.53M|                                        expr1,
  495|  1.53M|                                        id,
  496|  1.53M|                                        idLocation,
  497|  1.53M|                                        params,
  498|  1.53M|                                        meth_comma,
  499|  1.53M|                                        op.fodder,
  500|  1.53M|                                        body,
  501|  1.53M|                                        nullptr,
  502|  1.53M|                                        comma_fodder);
  503|  1.53M|                } break;
  504|       |
  505|  45.1k|                case Token::LOCAL: {
  ------------------
  |  Branch (505:17): [True: 45.1k, False: 1.59M]
  ------------------
  506|  45.1k|                    Fodder local_fodder = next.fodder;
  507|  45.1k|                    Token var_id = popExpect(Token::IDENTIFIER);
  508|  45.1k|                    auto *id = alloc->makeIdentifier(var_id.data32());
  509|       |
  510|  45.1k|                    if (binds.find(id) != binds.end()) {
  ------------------
  |  Branch (510:25): [True: 1, False: 45.1k]
  ------------------
  511|      1|                        throw StaticError(var_id.location, "duplicate local var: " + var_id.data);
  512|      1|                    }
  513|  45.1k|                    bool is_method = false;
  514|  45.1k|                    bool func_comma = false;
  515|  45.1k|                    ArgParams params;
  516|  45.1k|                    Fodder paren_l_fodder;
  517|  45.1k|                    Fodder paren_r_fodder;
  518|  45.1k|                    if (peek().kind == Token::PAREN_L) {
  ------------------
  |  Branch (518:25): [True: 7.01k, False: 38.1k]
  ------------------
  519|  7.01k|                        Token paren_l = pop();
  520|  7.01k|                        paren_l_fodder = paren_l.fodder;
  521|  7.01k|                        is_method = true;
  522|  7.01k|                        params = parseParams("function parameter", func_comma, paren_r_fodder, current_depth);
  523|  7.01k|                    }
  524|  45.1k|                    Token eq = popExpect(Token::OPERATOR, "=");
  525|  45.1k|                    AST *body = parse(MAX_PRECEDENCE, current_depth + 1);
  526|  45.1k|                    binds.insert(id);
  527|       |
  528|  45.1k|                    Fodder comma_fodder;
  529|  45.1k|                    next = pop();
  530|  45.1k|                    if (next.kind == Token::COMMA) {
  ------------------
  |  Branch (530:25): [True: 43.7k, False: 1.40k]
  ------------------
  531|  43.7k|                        comma_fodder = next.fodder;
  532|  43.7k|                        next = pop();
  533|  43.7k|                        got_comma = true;
  534|  43.7k|                    }
  535|  45.1k|                    fields.push_back(ObjectField::Local(local_fodder,
  536|  45.1k|                                                        var_id.fodder,
  537|  45.1k|                                                        paren_l_fodder,
  538|  45.1k|                                                        paren_r_fodder,
  539|  45.1k|                                                        is_method,
  540|  45.1k|                                                        id,
  541|  45.1k|                                                        params,
  542|  45.1k|                                                        func_comma,
  543|  45.1k|                                                        eq.fodder,
  544|  45.1k|                                                        body,
  545|  45.1k|                                                        comma_fodder));
  546|       |
  547|  45.1k|                } break;
  548|       |
  549|  53.5k|                case Token::ASSERT: {
  ------------------
  |  Branch (549:17): [True: 53.5k, False: 1.58M]
  ------------------
  550|  53.5k|                    Fodder assert_fodder = next.fodder;
  551|  53.5k|                    AST *cond = parse(MAX_PRECEDENCE, current_depth + 1);
  552|  53.5k|                    AST *msg = nullptr;
  553|  53.5k|                    Fodder colon_fodder;
  554|  53.5k|                    if (peek().kind == Token::OPERATOR && peek().data == ":") {
  ------------------
  |  Branch (554:25): [True: 44.8k, False: 8.78k]
  |  Branch (554:59): [True: 44.8k, False: 1]
  ------------------
  555|  44.8k|                        Token colon = pop();
  556|  44.8k|                        colon_fodder = colon.fodder;
  557|  44.8k|                        msg = parse(MAX_PRECEDENCE, current_depth + 1);
  558|  44.8k|                    }
  559|       |
  560|  53.5k|                    Fodder comma_fodder;
  561|  53.5k|                    next = pop();
  562|  53.5k|                    if (next.kind == Token::COMMA) {
  ------------------
  |  Branch (562:25): [True: 51.7k, False: 1.83k]
  ------------------
  563|  51.7k|                        comma_fodder = next.fodder;
  564|  51.7k|                        next = pop();
  565|  51.7k|                        got_comma = true;
  566|  51.7k|                    }
  567|  53.5k|                    fields.push_back(
  568|  53.5k|                        ObjectField::Assert(assert_fodder, cond, colon_fodder, msg, comma_fodder));
  569|  53.5k|                } break;
  570|       |
  571|     55|                default: throw unexpected(next, "parsing field definition");
  ------------------
  |  Branch (571:17): [True: 55, False: 1.64M]
  ------------------
  572|  1.64M|            }
  573|       |
  574|  1.64M|        } while (true);
  ------------------
  |  Branch (574:18): [True: 1.63M, Folded]
  ------------------
  575|   397k|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14spanERKNS0_5TokenES4_:
   89|  12.3M|{
   90|  12.3M|    return LocationRange(begin.location.file, begin.location.begin, end.location.end);
   91|  12.3M|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser23parseComprehensionSpecsENS0_5Token4KindENSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS0_17ComprehensionSpecENS8_ISB_EEEEj:
  588|   229k|    {
  589|   229k|        if (current_depth >= MAX_PARSER_DEPTH) {
  ------------------
  |  Branch (589:13): [True: 0, False: 229k]
  ------------------
  590|      0|            throw StaticError(peek().location, "Exceeded maximum parse depth limit.");
  591|      0|        }
  592|       |
  593|   251k|        while (true) {
  ------------------
  |  Branch (593:16): [True: 250k, Folded]
  ------------------
  594|   250k|            LocationRange l;
  595|   250k|            Token id_token = popExpect(Token::IDENTIFIER);
  596|   250k|            const Identifier *id = alloc->makeIdentifier(id_token.data32());
  597|   250k|            Token in_token = popExpect(Token::IN);
  598|   250k|            AST *arr = parse(MAX_PRECEDENCE, current_depth + 1);
  599|   250k|            specs.emplace_back(
  600|   250k|                ComprehensionSpec::FOR, for_fodder, id_token.fodder, id, in_token.fodder, arr);
  601|       |
  602|   250k|            Token maybe_if = pop();
  603|   433k|            for (; maybe_if.kind == Token::IF; maybe_if = pop()) {
  ------------------
  |  Branch (603:20): [True: 182k, False: 250k]
  ------------------
  604|   182k|                AST *cond = parse(MAX_PRECEDENCE, current_depth + 1);
  605|   182k|                specs.emplace_back(
  606|   182k|                    ComprehensionSpec::IF, maybe_if.fodder, Fodder{}, nullptr, Fodder{}, cond);
  607|   182k|            }
  608|   250k|            if (maybe_if.kind == end) {
  ------------------
  |  Branch (608:17): [True: 228k, False: 21.9k]
  ------------------
  609|   228k|                return maybe_if;
  610|   228k|            }
  611|  21.9k|            if (maybe_if.kind != Token::FOR) {
  ------------------
  |  Branch (611:17): [True: 29, False: 21.8k]
  ------------------
  612|     29|                std::stringstream ss;
  613|     29|                ss << "expected for, if or " << end << " after for clause, got: " << maybe_if;
  614|     29|                throw StaticError(maybe_if.location, ss.str());
  615|     29|            }
  616|  21.8k|            for_fodder = maybe_if.fodder;
  617|  21.8k|        }
  618|   229k|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14spanERKNS0_5TokenE:
   84|  27.1M|{
   85|  27.1M|    return LocationRange(begin.location.file, begin.location.begin, begin.location.end);
   86|  27.1M|}
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_16Parser10parseInfixEPNS0_3ASTERKNS0_5TokenEjj:
 1009|  29.0M|    {
 1010|  29.0M|        if (current_depth >= MAX_PARSER_DEPTH) {
  ------------------
  |  Branch (1010:13): [True: 0, False: 29.0M]
  ------------------
 1011|      0|            throw StaticError(peek().location, "Exceeded maximum parse depth limit.");
 1012|      0|        }
 1013|       |
 1014|  45.1M|        while (true) {
  ------------------
  |  Branch (1014:16): [True: 45.1M, Folded]
  ------------------
 1015|       |
 1016|  45.1M|            BinaryOp bop = BOP_PLUS;
 1017|  45.1M|            unsigned op_precedence = 0;
 1018|       |
 1019|  45.1M|            switch (peek().kind) {
 1020|       |                // Logical / arithmetic binary operator.
 1021|  1.43k|                case Token::IN:
  ------------------
  |  Branch (1021:17): [True: 1.43k, False: 45.1M]
  ------------------
 1022|  6.95M|                case Token::OPERATOR:
  ------------------
  |  Branch (1022:17): [True: 6.95M, False: 38.2M]
  ------------------
 1023|       |                    // These occur if the outer statement was an assert or array slice.
 1024|       |                    // Either way, we terminate the parsing here.
 1025|  6.95M|                    if (peek().data == ":" || peek().data == "::") {
  ------------------
  |  Branch (1025:25): [True: 541k, False: 6.41M]
  |  Branch (1025:47): [True: 1.05k, False: 6.41M]
  ------------------
 1026|   542k|                        return lhs;
 1027|   542k|                    }
 1028|  6.41M|                    if (!op_is_binary(peek().data, bop)) {
  ------------------
  |  Branch (1028:25): [True: 110, False: 6.41M]
  ------------------
 1029|    110|                        std::stringstream ss;
 1030|    110|                        ss << "not a binary operator: " << peek().data;
 1031|    110|                        throw StaticError(peek().location, ss.str());
 1032|    110|                    }
 1033|  6.41M|                    op_precedence = precedence_map[bop];
 1034|  6.41M|                    break;
 1035|       |
 1036|       |                // Index, Apply
 1037|  4.48M|                case Token::DOT:
  ------------------
  |  Branch (1037:17): [True: 4.48M, False: 40.6M]
  ------------------
 1038|  5.59M|                case Token::BRACKET_L:
  ------------------
  |  Branch (1038:17): [True: 1.10M, False: 44.0M]
  ------------------
 1039|  10.6M|                case Token::PAREN_L:
  ------------------
  |  Branch (1039:17): [True: 5.06M, False: 40.0M]
  ------------------
 1040|  10.7M|                case Token::BRACE_L:
  ------------------
  |  Branch (1040:17): [True: 87.6k, False: 45.0M]
  ------------------
 1041|  10.7M|                    op_precedence = APPLY_PRECEDENCE;
 1042|  10.7M|                    break;
 1043|       |
 1044|  27.4M|                default:
  ------------------
  |  Branch (1044:17): [True: 27.4M, False: 17.7M]
  ------------------
 1045|       |                    // This happens when we reach EOF or the terminating token of an outer context.
 1046|  27.4M|                    return lhs;
 1047|  45.1M|            }
 1048|       |
 1049|       |            // If higher precedence than the outer recursive call, let that handle it.
 1050|  17.1M|            if (op_precedence >= max_precedence)
  ------------------
  |  Branch (1050:17): [True: 999k, False: 16.1M]
  ------------------
 1051|   999k|                return lhs;
 1052|       |
 1053|  16.1M|            Token op = pop();
 1054|       |
 1055|  16.1M|            switch (op.kind) {
 1056|  1.10M|                case Token::BRACKET_L: {
  ------------------
  |  Branch (1056:17): [True: 1.10M, False: 15.0M]
  ------------------
 1057|  1.10M|                    bool is_slice;
 1058|  1.10M|                    AST *first = nullptr;
 1059|  1.10M|                    Fodder second_fodder;
 1060|  1.10M|                    AST *second = nullptr;
 1061|  1.10M|                    Fodder third_fodder;
 1062|  1.10M|                    AST *third = nullptr;
 1063|       |
 1064|  1.10M|                    if (peek().kind == Token::BRACKET_R)
  ------------------
  |  Branch (1064:25): [True: 1, False: 1.10M]
  ------------------
 1065|      1|                        throw unexpected(pop(), "parsing index");
 1066|       |
 1067|  1.10M|                    if (peek().data != ":" && peek().data != "::") {
  ------------------
  |  Branch (1067:25): [True: 1.09M, False: 15.1k]
  |  Branch (1067:47): [True: 1.09M, False: 1.07k]
  ------------------
 1068|  1.09M|                        first = parse(MAX_PRECEDENCE, current_depth + 1);
 1069|  1.09M|                    }
 1070|       |
 1071|  1.10M|                    if (peek().kind == Token::OPERATOR && peek().data == "::") {
  ------------------
  |  Branch (1071:25): [True: 116k, False: 991k]
  |  Branch (1071:59): [True: 1.19k, False: 115k]
  ------------------
 1072|       |                        // Handle ::
 1073|  1.19k|                        is_slice = true;
 1074|  1.19k|                        Token joined = pop();
 1075|  1.19k|                        second_fodder = joined.fodder;
 1076|       |
 1077|  1.19k|                        if (peek().kind != Token::BRACKET_R)
  ------------------
  |  Branch (1077:29): [True: 907, False: 287]
  ------------------
 1078|    907|                            third = parse(MAX_PRECEDENCE, current_depth + 1);
 1079|       |
 1080|  1.10M|                    } else if (peek().kind != Token::BRACKET_R) {
  ------------------
  |  Branch (1080:32): [True: 115k, False: 991k]
  ------------------
 1081|   115k|                        is_slice = true;
 1082|   115k|                        Token delim = pop();
 1083|   115k|                        if (delim.data != ":")
  ------------------
  |  Branch (1083:29): [True: 111, False: 115k]
  ------------------
 1084|    111|                            throw unexpected(delim, "parsing slice");
 1085|       |
 1086|   115k|                        second_fodder = delim.fodder;
 1087|       |
 1088|   115k|                        if (peek().data != ":" && peek().kind != Token::BRACKET_R)
  ------------------
  |  Branch (1088:29): [True: 115k, False: 110]
  |  Branch (1088:51): [True: 51.5k, False: 63.9k]
  ------------------
 1089|  51.5k|                            second = parse(MAX_PRECEDENCE, current_depth + 1);
 1090|       |
 1091|   115k|                        if (peek().kind != Token::BRACKET_R) {
  ------------------
  |  Branch (1091:29): [True: 7.02k, False: 108k]
  ------------------
 1092|  7.02k|                            Token delim = pop();
 1093|  7.02k|                            if (delim.data != ":")
  ------------------
  |  Branch (1093:33): [True: 35, False: 6.98k]
  ------------------
 1094|     35|                                throw unexpected(delim, "parsing slice");
 1095|       |
 1096|  6.98k|                            third_fodder = delim.fodder;
 1097|       |
 1098|  6.98k|                            if (peek().kind != Token::BRACKET_R)
  ------------------
  |  Branch (1098:33): [True: 6.71k, False: 271]
  ------------------
 1099|  6.71k|                                third = parse(MAX_PRECEDENCE, current_depth + 1);
 1100|  6.98k|                        }
 1101|   991k|                    } else {
 1102|   991k|                        is_slice = false;
 1103|   991k|                    }
 1104|  1.10M|                    Token end = popExpect(Token::BRACKET_R);
 1105|  1.10M|                    lhs = alloc->make<Index>(span(begin, end),
 1106|  1.10M|                                             EMPTY_FODDER,
 1107|  1.10M|                                             lhs,
 1108|  1.10M|                                             op.fodder,
 1109|  1.10M|                                             is_slice,
 1110|  1.10M|                                             first,
 1111|  1.10M|                                             second_fodder,
 1112|  1.10M|                                             second,
 1113|  1.10M|                                             third_fodder,
 1114|  1.10M|                                             third,
 1115|  1.10M|                                             end.fodder);
 1116|  1.10M|                    break;
 1117|  1.10M|                }
 1118|  4.48M|                case Token::DOT: {
  ------------------
  |  Branch (1118:17): [True: 4.48M, False: 11.6M]
  ------------------
 1119|  4.48M|                    Token field_id = popExpect(Token::IDENTIFIER);
 1120|  4.48M|                    const Identifier *id = alloc->makeIdentifier(field_id.data32());
 1121|  4.48M|                    lhs = alloc->make<Index>(span(begin, field_id),
 1122|  4.48M|                                             EMPTY_FODDER,
 1123|  4.48M|                                             lhs,
 1124|  4.48M|                                             op.fodder,
 1125|  4.48M|                                             field_id.fodder,
 1126|  4.48M|                                             id);
 1127|  4.48M|                    break;
 1128|  1.10M|                }
 1129|  5.06M|                case Token::PAREN_L: {
  ------------------
  |  Branch (1129:17): [True: 5.06M, False: 11.0M]
  ------------------
 1130|  5.06M|                    ArgParams args;
 1131|  5.06M|                    bool got_comma;
 1132|  5.06M|                    Token end = parseArgs(args, "function argument", got_comma, current_depth);
 1133|  5.06M|                    bool got_named = false;
 1134|  8.62M|                    for (const auto& arg : args) {
  ------------------
  |  Branch (1134:42): [True: 8.62M, False: 5.06M]
  ------------------
 1135|  8.62M|                        if (arg.id != nullptr) {
  ------------------
  |  Branch (1135:29): [True: 19.0k, False: 8.60M]
  ------------------
 1136|  19.0k|                            got_named = true;
 1137|  8.60M|                        } else {
 1138|  8.60M|                            if (got_named) {
  ------------------
  |  Branch (1138:33): [True: 4, False: 8.60M]
  ------------------
 1139|      4|                                throw StaticError(arg.expr->location, "Positional argument after a named argument is not allowed");
 1140|      4|                            }
 1141|  8.60M|                        }
 1142|  8.62M|                    }
 1143|  5.06M|                    bool tailstrict = false;
 1144|  5.06M|                    Fodder tailstrict_fodder;
 1145|  5.06M|                    if (peek().kind == Token::TAILSTRICT) {
  ------------------
  |  Branch (1145:25): [True: 249k, False: 4.81M]
  ------------------
 1146|   249k|                        Token tailstrict_token = pop();
 1147|   249k|                        tailstrict_fodder = tailstrict_token.fodder;
 1148|   249k|                        tailstrict = true;
 1149|   249k|                    }
 1150|  5.06M|                    lhs = alloc->make<Apply>(span(begin, end),
 1151|  5.06M|                                             EMPTY_FODDER,
 1152|  5.06M|                                             lhs,
 1153|  5.06M|                                             op.fodder,
 1154|  5.06M|                                             args,
 1155|  5.06M|                                             got_comma,
 1156|  5.06M|                                             end.fodder,
 1157|  5.06M|                                             tailstrict_fodder,
 1158|  5.06M|                                             tailstrict);
 1159|  5.06M|                    break;
 1160|  5.06M|                }
 1161|  87.6k|                case Token::BRACE_L: {
  ------------------
  |  Branch (1161:17): [True: 87.6k, False: 16.0M]
  ------------------
 1162|  87.6k|                    AST *obj;
 1163|  87.6k|                    Token end = parseObjectRemainder(obj, op, current_depth + 1);
 1164|  87.6k|                    lhs = alloc->make<ApplyBrace>(span(begin, end), EMPTY_FODDER, lhs, obj);
 1165|  87.6k|                    break;
 1166|  5.06M|                }
 1167|       |
 1168|  1.25k|                case Token::IN: {
  ------------------
  |  Branch (1168:17): [True: 1.25k, False: 16.1M]
  ------------------
 1169|  1.25k|                    if (peek().kind == Token::SUPER) {
  ------------------
  |  Branch (1169:25): [True: 331, False: 922]
  ------------------
 1170|    331|                        Token super = pop();
 1171|    331|                        lhs = alloc->make<InSuper>(
 1172|    331|                            span(begin, super), EMPTY_FODDER, lhs, op.fodder, super.fodder);
 1173|    922|                    } else {
 1174|    922|                        AST *rhs = parse(op_precedence, current_depth + 1);
 1175|    922|                        lhs = alloc->make<Binary>(
 1176|    922|                            span(begin, rhs), EMPTY_FODDER, lhs, op.fodder, bop, rhs);
 1177|    922|                    }
 1178|  1.25k|                    break;
 1179|  5.06M|                }
 1180|       |
 1181|  5.41M|                case Token::OPERATOR: {
  ------------------
  |  Branch (1181:17): [True: 5.41M, False: 10.7M]
  ------------------
 1182|  5.41M|                    AST *rhs = parse(op_precedence, current_depth + 1);
 1183|  5.41M|                    lhs = alloc->make<Binary>(
 1184|  5.41M|                        span(begin, rhs), EMPTY_FODDER, lhs, op.fodder, bop, rhs);
 1185|  5.41M|                    break;
 1186|  5.06M|                }
 1187|       |
 1188|      0|                default: {
  ------------------
  |  Branch (1188:17): [True: 0, False: 16.1M]
  ------------------
 1189|      0|                    std::cerr << "Should not be here." << std::endl;
 1190|      0|                    abort();
 1191|  5.06M|                }
 1192|  16.1M|            }
 1193|  16.1M|        }
 1194|       |
 1195|       |        // (1 & ((1 + (1 * 1)) + 1)) & 1
 1196|       |        //
 1197|       |        //
 1198|       |
 1199|       |/*
 1200|       |        // Allocate this on the heap to control stack growth.
 1201|       |        std::unique_ptr<Token> begin_(new Token(peek()));
 1202|       |        const Token &begin = *begin_;
 1203|       |*/
 1204|  29.0M|    }
parser.cpp:_ZN7jsonnet8internal12_GLOBAL__N_112op_is_binaryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERNS0_8BinaryOpE:
   75|  6.41M|{
   76|  6.41M|    auto it = binary_map.find(op);
   77|  6.41M|    if (it == binary_map.end())
  ------------------
  |  Branch (77:9): [True: 110, False: 6.41M]
  ------------------
   78|    110|        return false;
   79|  6.41M|    bop = it->second;
   80|  6.41M|    return true;
   81|  6.41M|}

_ZN7jsonnet8internal12CompilerPass6fodderERNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEE:
   22|  16.7M|{
   23|  16.7M|    for (auto &f : fodder)
  ------------------
  |  Branch (23:18): [True: 246k, False: 16.7M]
  ------------------
   24|   246k|        fodderElement(f);
   25|  16.7M|}
_ZN7jsonnet8internal12CompilerPass6paramsERNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEERNS3_INS0_8ArgParamENS5_IS9_EEEES8_:
   43|   480k|{
   44|   480k|    fodder(fodder_l);
   45|  1.11M|    for (auto &param : params) {
  ------------------
  |  Branch (45:22): [True: 1.11M, False: 480k]
  ------------------
   46|  1.11M|        fodder(param.idFodder);
   47|  1.11M|        if (param.expr) {
  ------------------
  |  Branch (47:13): [True: 516k, False: 594k]
  ------------------
   48|   516k|            fodder(param.eqFodder);
   49|   516k|            expr(param.expr);
   50|   516k|        }
   51|  1.11M|        fodder(param.commaFodder);
   52|  1.11M|    }
   53|   480k|    fodder(fodder_r);
   54|   480k|}
_ZN7jsonnet8internal12CompilerPass4exprERPNS0_3ASTE:
  110|  8.60M|{
  111|  8.60M|    fodder(ast_->openFodder);
  112|  8.60M|    visitExpr(ast_);
  113|  8.60M|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ApplyE:
  116|   288k|{
  117|   288k|    expr(ast->target);
  118|   288k|    params(ast->fodderL, ast->args, ast->fodderR);
  119|   288k|    if (ast->tailstrict) {
  ------------------
  |  Branch (119:9): [True: 176k, False: 111k]
  ------------------
  120|   176k|        fodder(ast->tailstrictFodder);
  121|   176k|    }
  122|   288k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ArrayE:
  131|   135k|{
  132|   160k|    for (auto &element : ast->elements) {
  ------------------
  |  Branch (132:24): [True: 160k, False: 135k]
  ------------------
  133|   160k|        expr(element.expr);
  134|   160k|        fodder(element.commaFodder);
  135|   160k|    }
  136|   135k|    fodder(ast->closeFodder);
  137|   135k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_6BinaryE:
  159|   832k|{
  160|   832k|    expr(ast->left);
  161|   832k|    fodder(ast->opFodder);
  162|   832k|    expr(ast->right);
  163|   832k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_11ConditionalE:
  166|   365k|{
  167|   365k|    expr(ast->cond);
  168|   365k|    fodder(ast->thenFodder);
  169|   365k|    if (ast->branchFalse != nullptr) {
  ------------------
  |  Branch (169:9): [True: 365k, False: 0]
  ------------------
  170|   365k|        expr(ast->branchTrue);
  171|   365k|        fodder(ast->elseFodder);
  172|   365k|        expr(ast->branchFalse);
  173|   365k|    } else {
  174|      0|        expr(ast->branchTrue);
  175|      0|    }
  176|   365k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ErrorE:
  179|  78.1k|{
  180|  78.1k|    expr(ast->expr);
  181|  78.1k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_8FunctionE:
  184|   191k|{
  185|   191k|    params(ast->parenLeftFodder, ast->params, ast->parenRightFodder);
  186|   191k|    expr(ast->body);
  187|   191k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_6ImportE:
  190|  1.87k|{
  191|  1.87k|    visit(ast->file);
  192|  1.87k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_9ImportstrE:
  195|  9.18k|{
  196|  9.18k|    visit(ast->file);
  197|  9.18k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_9ImportbinE:
  200|  1.59k|{
  201|  1.59k|    visit(ast->file);
  202|  1.59k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_7InSuperE:
  205|   150k|{
  206|   150k|    expr(ast->element);
  207|   150k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5IndexE:
  210|   335k|{
  211|   335k|    expr(ast->target);
  212|   335k|    if (ast->id != nullptr) {
  ------------------
  |  Branch (212:9): [True: 0, False: 335k]
  ------------------
  213|   335k|    } else {
  214|   335k|        if (ast->isSlice) {
  ------------------
  |  Branch (214:13): [True: 0, False: 335k]
  ------------------
  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|   335k|        } else {
  222|   335k|            expr(ast->index);
  223|   335k|        }
  224|   335k|    }
  225|   335k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5LocalE:
  228|   180k|{
  229|   180k|    assert(ast->binds.size() > 0);
  ------------------
  |  Branch (229:5): [True: 180k, False: 0]
  ------------------
  230|   803k|    for (auto &bind : ast->binds) {
  ------------------
  |  Branch (230:21): [True: 803k, False: 180k]
  ------------------
  231|   803k|        fodder(bind.varFodder);
  232|   803k|        if (bind.functionSugar) {
  ------------------
  |  Branch (232:13): [True: 0, False: 803k]
  ------------------
  233|      0|            params(bind.parenLeftFodder, bind.params, bind.parenRightFodder);
  234|      0|        }
  235|   803k|        fodder(bind.opFodder);
  236|   803k|        expr(bind.body);
  237|   803k|        fodder(bind.closeFodder);
  238|   803k|    }
  239|   180k|    expr(ast->body);
  240|   180k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_15DesugaredObjectE:
  249|   717k|{
  250|   717k|    for (AST *assert : ast->asserts) {
  ------------------
  |  Branch (250:22): [True: 10.6k, False: 717k]
  ------------------
  251|  10.6k|        expr(assert);
  252|  10.6k|    }
  253|   717k|    for (auto &field : ast->fields) {
  ------------------
  |  Branch (253:22): [True: 547k, False: 717k]
  ------------------
  254|   547k|        expr(field.name);
  255|   547k|        expr(field.body);
  256|   547k|    }
  257|   717k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_25ObjectComprehensionSimpleE:
  267|  32.3k|{
  268|  32.3k|    expr(ast->field);
  269|  32.3k|    expr(ast->value);
  270|  32.3k|    expr(ast->array);
  271|  32.3k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_10SuperIndexE:
  280|   151k|{
  281|   151k|    if (ast->id != nullptr) {
  ------------------
  |  Branch (281:9): [True: 0, False: 151k]
  ------------------
  282|   151k|    } else {
  283|   151k|        expr(ast->index);
  284|   151k|    }
  285|   151k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5UnaryE:
  288|  1.39M|{
  289|  1.39M|    expr(ast->expr);
  290|  1.39M|}
_ZN7jsonnet8internal12CompilerPass9visitExprERPNS0_3ASTE:
  300|  8.60M|{
  301|  8.60M|    switch(ast_->type) {
  302|   288k|        VISIT(ast_, AST_APPLY, Apply);
  ------------------
  |  |  293|   288k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 288k, False: 8.31M]
  |  |  ------------------
  |  |  294|   288k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   288k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   288k|     visit(ast); \
  |  |  297|   288k|   } break
  ------------------
  |  Branch (302:9): [True: 288k, False: 0]
  ------------------
  303|      0|        VISIT(ast_, AST_APPLY_BRACE, ApplyBrace);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (303:9): [True: 0, False: 0]
  ------------------
  304|   135k|        VISIT(ast_, AST_ARRAY, Array);
  ------------------
  |  |  293|   135k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 135k, False: 8.47M]
  |  |  ------------------
  |  |  294|   135k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   135k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   135k|     visit(ast); \
  |  |  297|   135k|   } break
  ------------------
  |  Branch (304:9): [True: 135k, False: 0]
  ------------------
  305|      0|        VISIT(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehension);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (305:9): [True: 0, False: 0]
  ------------------
  306|       |        // VISIT(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehensionSimple);
  307|      0|        VISIT(ast_, AST_ASSERT, Assert);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (307:9): [True: 0, False: 0]
  ------------------
  308|   832k|        VISIT(ast_, AST_BINARY, Binary);
  ------------------
  |  |  293|   832k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 832k, False: 7.77M]
  |  |  ------------------
  |  |  294|   832k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   832k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   832k|     visit(ast); \
  |  |  297|   832k|   } break
  ------------------
  |  Branch (308:9): [True: 832k, False: 0]
  ------------------
  309|      0|        VISIT(ast_, AST_BUILTIN_FUNCTION, BuiltinFunction);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (309:9): [True: 0, False: 0]
  ------------------
  310|      0|        VISIT(ast_, AST_BUILTIN_FUNCTION_BODY, BuiltinFunctionBody);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (310:9): [True: 0, False: 0]
  ------------------
  311|   365k|        VISIT(ast_, AST_CONDITIONAL, Conditional);
  ------------------
  |  |  293|   365k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 365k, False: 8.24M]
  |  |  ------------------
  |  |  294|   365k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   365k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   365k|     visit(ast); \
  |  |  297|   365k|   } break
  ------------------
  |  Branch (311:9): [True: 365k, False: 0]
  ------------------
  312|   717k|        VISIT(ast_, AST_DESUGARED_OBJECT, DesugaredObject);
  ------------------
  |  |  293|   717k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 717k, False: 7.88M]
  |  |  ------------------
  |  |  294|   717k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   717k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   717k|     visit(ast); \
  |  |  297|   717k|   } break
  ------------------
  |  Branch (312:9): [True: 717k, False: 0]
  ------------------
  313|      0|        VISIT(ast_, AST_DOLLAR, Dollar);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (313:9): [True: 0, False: 0]
  ------------------
  314|  78.1k|        VISIT(ast_, AST_ERROR, Error);
  ------------------
  |  |  293|  78.1k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 78.1k, False: 8.52M]
  |  |  ------------------
  |  |  294|  78.1k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  78.1k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  78.1k|     visit(ast); \
  |  |  297|  78.1k|   } break
  ------------------
  |  Branch (314:9): [True: 78.1k, False: 0]
  ------------------
  315|   191k|        VISIT(ast_, AST_FUNCTION, Function);
  ------------------
  |  |  293|   191k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 191k, False: 8.41M]
  |  |  ------------------
  |  |  294|   191k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   191k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   191k|     visit(ast); \
  |  |  297|   191k|   } break
  ------------------
  |  Branch (315:9): [True: 191k, False: 0]
  ------------------
  316|  1.87k|        VISIT(ast_, AST_IMPORT, Import);
  ------------------
  |  |  293|  1.87k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.87k, False: 8.60M]
  |  |  ------------------
  |  |  294|  1.87k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.87k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.87k|     visit(ast); \
  |  |  297|  1.87k|   } break
  ------------------
  |  Branch (316:9): [True: 1.87k, False: 0]
  ------------------
  317|  9.18k|        VISIT(ast_, AST_IMPORTSTR, Importstr);
  ------------------
  |  |  293|  9.18k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 9.18k, False: 8.59M]
  |  |  ------------------
  |  |  294|  9.18k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  9.18k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  9.18k|     visit(ast); \
  |  |  297|  9.18k|   } break
  ------------------
  |  Branch (317:9): [True: 9.18k, False: 0]
  ------------------
  318|  1.59k|        VISIT(ast_, AST_IMPORTBIN, Importbin);
  ------------------
  |  |  293|  1.59k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.59k, False: 8.60M]
  |  |  ------------------
  |  |  294|  1.59k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.59k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.59k|     visit(ast); \
  |  |  297|  1.59k|   } break
  ------------------
  |  Branch (318:9): [True: 1.59k, False: 0]
  ------------------
  319|   335k|        VISIT(ast_, AST_INDEX, Index);
  ------------------
  |  |  293|   335k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 335k, False: 8.27M]
  |  |  ------------------
  |  |  294|   335k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   335k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   335k|     visit(ast); \
  |  |  297|   335k|   } break
  ------------------
  |  Branch (319:9): [True: 335k, False: 0]
  ------------------
  320|   150k|        VISIT(ast_, AST_IN_SUPER, InSuper);
  ------------------
  |  |  293|   150k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 150k, False: 8.45M]
  |  |  ------------------
  |  |  294|   150k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   150k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   150k|     visit(ast); \
  |  |  297|   150k|   } break
  ------------------
  |  Branch (320:9): [True: 150k, False: 0]
  ------------------
  321|  11.1k|        VISIT(ast_, AST_LITERAL_BOOLEAN, LiteralBoolean);
  ------------------
  |  |  293|  11.1k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 11.1k, False: 8.59M]
  |  |  ------------------
  |  |  294|  11.1k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  11.1k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  11.1k|     visit(ast); \
  |  |  297|  11.1k|   } break
  ------------------
  |  Branch (321:9): [True: 11.1k, False: 0]
  ------------------
  322|  8.41k|        VISIT(ast_, AST_LITERAL_NULL, LiteralNull);
  ------------------
  |  |  293|  8.41k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 8.41k, False: 8.59M]
  |  |  ------------------
  |  |  294|  8.41k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  8.41k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  8.41k|     visit(ast); \
  |  |  297|  8.41k|   } break
  ------------------
  |  Branch (322:9): [True: 8.41k, False: 0]
  ------------------
  323|   589k|        VISIT(ast_, AST_LITERAL_NUMBER, LiteralNumber);
  ------------------
  |  |  293|   589k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 589k, False: 8.01M]
  |  |  ------------------
  |  |  294|   589k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   589k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   589k|     visit(ast); \
  |  |  297|   589k|   } break
  ------------------
  |  Branch (323:9): [True: 589k, False: 0]
  ------------------
  324|  1.34M|        VISIT(ast_, AST_LITERAL_STRING, LiteralString);
  ------------------
  |  |  293|  1.34M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.34M, False: 7.26M]
  |  |  ------------------
  |  |  294|  1.34M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.34M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.34M|     visit(ast); \
  |  |  297|  1.34M|   } break
  ------------------
  |  Branch (324:9): [True: 1.34M, False: 0]
  ------------------
  325|   180k|        VISIT(ast_, AST_LOCAL, Local);
  ------------------
  |  |  293|   180k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 180k, False: 8.42M]
  |  |  ------------------
  |  |  294|   180k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   180k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   180k|     visit(ast); \
  |  |  297|   180k|   } break
  ------------------
  |  Branch (325:9): [True: 180k, False: 0]
  ------------------
  326|      0|        VISIT(ast_, AST_OBJECT, Object);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (326:9): [True: 0, False: 0]
  ------------------
  327|      0|        VISIT(ast_, AST_OBJECT_COMPREHENSION, ObjectComprehension);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (327:9): [True: 0, False: 0]
  ------------------
  328|  32.3k|        VISIT(ast_, AST_OBJECT_COMPREHENSION_SIMPLE, ObjectComprehensionSimple);
  ------------------
  |  |  293|  32.3k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 32.3k, False: 8.57M]
  |  |  ------------------
  |  |  294|  32.3k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  32.3k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  32.3k|     visit(ast); \
  |  |  297|  32.3k|   } break
  ------------------
  |  Branch (328:9): [True: 32.3k, False: 0]
  ------------------
  329|      0|        VISIT(ast_, AST_PARENS, Parens);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 8.60M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (329:9): [True: 0, False: 0]
  ------------------
  330|  7.32k|        VISIT(ast_, AST_SELF, Self);
  ------------------
  |  |  293|  7.32k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 7.32k, False: 8.59M]
  |  |  ------------------
  |  |  294|  7.32k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  7.32k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  7.32k|     visit(ast); \
  |  |  297|  7.32k|   } break
  ------------------
  |  Branch (330:9): [True: 7.32k, False: 0]
  ------------------
  331|   151k|        VISIT(ast_, AST_SUPER_INDEX, SuperIndex);
  ------------------
  |  |  293|   151k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 151k, False: 8.45M]
  |  |  ------------------
  |  |  294|   151k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   151k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   151k|     visit(ast); \
  |  |  297|   151k|   } break
  ------------------
  |  Branch (331:9): [True: 151k, False: 0]
  ------------------
  332|  1.39M|        VISIT(ast_, AST_UNARY, Unary);
  ------------------
  |  |  293|  1.39M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.39M, False: 7.21M]
  |  |  ------------------
  |  |  294|  1.39M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.39M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.39M|     visit(ast); \
  |  |  297|  1.39M|   } break
  ------------------
  |  Branch (332:9): [True: 1.39M, False: 0]
  ------------------
  333|  1.78M|        VISIT(ast_, AST_VAR, Var);
  ------------------
  |  |  293|  1.78M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.78M, False: 6.82M]
  |  |  ------------------
  |  |  294|  1.78M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.78M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.78M|     visit(ast); \
  |  |  297|  1.78M|   } break
  ------------------
  |  Branch (333:9): [True: 1.78M, False: 0]
  ------------------
  334|      0|        default:
  ------------------
  |  Branch (334:9): [True: 0, False: 8.60M]
  ------------------
  335|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  336|      0|            std::abort();
  337|      0|            break;
  338|  8.60M|    }
  339|  8.60M|}
_ZN7jsonnet8internal9ClonePass4exprERPNS0_3ASTE:
  362|  7.52M|{
  363|  7.52M|    switch(ast_->type) {
  364|   246k|        CLONE(ast_, AST_APPLY, Apply);
  ------------------
  |  |  355|   246k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 246k, False: 7.27M]
  |  |  ------------------
  |  |  356|   246k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   246k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   246k|     var = alloc.clone(ast); \
  |  |  359|   246k|   } break
  ------------------
  |  Branch (364:9): [True: 246k, False: 0]
  ------------------
  365|      0|        CLONE(ast_, AST_APPLY_BRACE, ApplyBrace);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 7.52M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (365:9): [True: 0, False: 0]
  ------------------
  366|   117k|        CLONE(ast_, AST_ARRAY, Array);
  ------------------
  |  |  355|   117k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 117k, False: 7.40M]
  |  |  ------------------
  |  |  356|   117k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   117k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   117k|     var = alloc.clone(ast); \
  |  |  359|   117k|   } break
  ------------------
  |  Branch (366:9): [True: 117k, False: 0]
  ------------------
  367|      0|        CLONE(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehension);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 7.52M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (367:9): [True: 0, False: 0]
  ------------------
  368|       |        // CLONE(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehensionSimple);
  369|      0|        CLONE(ast_, AST_ASSERT, Assert);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 7.52M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (369:9): [True: 0, False: 0]
  ------------------
  370|   724k|        CLONE(ast_, AST_BINARY, Binary);
  ------------------
  |  |  355|   724k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 724k, False: 6.79M]
  |  |  ------------------
  |  |  356|   724k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   724k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   724k|     var = alloc.clone(ast); \
  |  |  359|   724k|   } break
  ------------------
  |  Branch (370:9): [True: 724k, False: 0]
  ------------------
  371|      0|        CLONE(ast_, AST_BUILTIN_FUNCTION, BuiltinFunction);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 7.52M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (371:9): [True: 0, False: 0]
  ------------------
  372|   332k|        CLONE(ast_, AST_CONDITIONAL, Conditional);
  ------------------
  |  |  355|   332k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 332k, False: 7.18M]
  |  |  ------------------
  |  |  356|   332k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   332k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   332k|     var = alloc.clone(ast); \
  |  |  359|   332k|   } break
  ------------------
  |  Branch (372:9): [True: 332k, False: 0]
  ------------------
  373|   642k|        CLONE(ast_, AST_DESUGARED_OBJECT, DesugaredObject);
  ------------------
  |  |  355|   642k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 642k, False: 6.87M]
  |  |  ------------------
  |  |  356|   642k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   642k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   642k|     var = alloc.clone(ast); \
  |  |  359|   642k|   } break
  ------------------
  |  Branch (373:9): [True: 642k, False: 0]
  ------------------
  374|      0|        CLONE(ast_, AST_DOLLAR, Dollar);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 7.52M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (374:9): [True: 0, False: 0]
  ------------------
  375|  67.8k|        CLONE(ast_, AST_ERROR, Error);
  ------------------
  |  |  355|  67.8k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 67.8k, False: 7.45M]
  |  |  ------------------
  |  |  356|  67.8k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  67.8k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  67.8k|     var = alloc.clone(ast); \
  |  |  359|  67.8k|   } break
  ------------------
  |  Branch (375:9): [True: 67.8k, False: 0]
  ------------------
  376|   159k|        CLONE(ast_, AST_FUNCTION, Function);
  ------------------
  |  |  355|   159k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 159k, False: 7.36M]
  |  |  ------------------
  |  |  356|   159k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   159k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   159k|     var = alloc.clone(ast); \
  |  |  359|   159k|   } break
  ------------------
  |  Branch (376:9): [True: 159k, False: 0]
  ------------------
  377|  1.66k|        CLONE(ast_, AST_IMPORT, Import);
  ------------------
  |  |  355|  1.66k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.66k, False: 7.51M]
  |  |  ------------------
  |  |  356|  1.66k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.66k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.66k|     var = alloc.clone(ast); \
  |  |  359|  1.66k|   } break
  ------------------
  |  Branch (377:9): [True: 1.66k, False: 0]
  ------------------
  378|  6.96k|        CLONE(ast_, AST_IMPORTSTR, Importstr);
  ------------------
  |  |  355|  6.96k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 6.96k, False: 7.51M]
  |  |  ------------------
  |  |  356|  6.96k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  6.96k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  6.96k|     var = alloc.clone(ast); \
  |  |  359|  6.96k|   } break
  ------------------
  |  Branch (378:9): [True: 6.96k, False: 0]
  ------------------
  379|  1.07k|        CLONE(ast_, AST_IMPORTBIN, Importbin);
  ------------------
  |  |  355|  1.07k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.07k, False: 7.51M]
  |  |  ------------------
  |  |  356|  1.07k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.07k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.07k|     var = alloc.clone(ast); \
  |  |  359|  1.07k|   } break
  ------------------
  |  Branch (379:9): [True: 1.07k, False: 0]
  ------------------
  380|   285k|        CLONE(ast_, AST_INDEX, Index);
  ------------------
  |  |  355|   285k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 285k, False: 7.23M]
  |  |  ------------------
  |  |  356|   285k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   285k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   285k|     var = alloc.clone(ast); \
  |  |  359|   285k|   } break
  ------------------
  |  Branch (380:9): [True: 285k, False: 0]
  ------------------
  381|   150k|        CLONE(ast_, AST_IN_SUPER, InSuper);
  ------------------
  |  |  355|   150k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 150k, False: 7.37M]
  |  |  ------------------
  |  |  356|   150k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   150k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   150k|     var = alloc.clone(ast); \
  |  |  359|   150k|   } break
  ------------------
  |  Branch (381:9): [True: 150k, False: 0]
  ------------------
  382|  10.6k|        CLONE(ast_, AST_LITERAL_BOOLEAN, LiteralBoolean);
  ------------------
  |  |  355|  10.6k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 10.6k, False: 7.51M]
  |  |  ------------------
  |  |  356|  10.6k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  10.6k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  10.6k|     var = alloc.clone(ast); \
  |  |  359|  10.6k|   } break
  ------------------
  |  Branch (382:9): [True: 10.6k, False: 0]
  ------------------
  383|  6.53k|        CLONE(ast_, AST_LITERAL_NULL, LiteralNull);
  ------------------
  |  |  355|  6.53k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 6.53k, False: 7.51M]
  |  |  ------------------
  |  |  356|  6.53k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  6.53k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  6.53k|     var = alloc.clone(ast); \
  |  |  359|  6.53k|   } break
  ------------------
  |  Branch (383:9): [True: 6.53k, False: 0]
  ------------------
  384|   504k|        CLONE(ast_, AST_LITERAL_NUMBER, LiteralNumber);
  ------------------
  |  |  355|   504k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 504k, False: 7.01M]
  |  |  ------------------
  |  |  356|   504k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   504k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   504k|     var = alloc.clone(ast); \
  |  |  359|   504k|   } break
  ------------------
  |  Branch (384:9): [True: 504k, False: 0]
  ------------------
  385|  1.20M|        CLONE(ast_, AST_LITERAL_STRING, LiteralString);
  ------------------
  |  |  355|  1.20M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.20M, False: 6.31M]
  |  |  ------------------
  |  |  356|  1.20M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.20M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.20M|     var = alloc.clone(ast); \
  |  |  359|  1.20M|   } break
  ------------------
  |  Branch (385:9): [True: 1.20M, False: 0]
  ------------------
  386|   161k|        CLONE(ast_, AST_LOCAL, Local);
  ------------------
  |  |  355|   161k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 161k, False: 7.35M]
  |  |  ------------------
  |  |  356|   161k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   161k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   161k|     var = alloc.clone(ast); \
  |  |  359|   161k|   } break
  ------------------
  |  Branch (386:9): [True: 161k, False: 0]
  ------------------
  387|      0|        CLONE(ast_, AST_OBJECT, Object);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 7.52M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (387:9): [True: 0, False: 0]
  ------------------
  388|      0|        CLONE(ast_, AST_OBJECT_COMPREHENSION, ObjectComprehension);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 7.52M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (388:9): [True: 0, False: 0]
  ------------------
  389|  26.9k|        CLONE(ast_, AST_OBJECT_COMPREHENSION_SIMPLE, ObjectComprehensionSimple);
  ------------------
  |  |  355|  26.9k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 26.9k, False: 7.49M]
  |  |  ------------------
  |  |  356|  26.9k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  26.9k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  26.9k|     var = alloc.clone(ast); \
  |  |  359|  26.9k|   } break
  ------------------
  |  Branch (389:9): [True: 26.9k, False: 0]
  ------------------
  390|      0|        CLONE(ast_, AST_PARENS, Parens);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 7.52M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (390:9): [True: 0, False: 0]
  ------------------
  391|  7.32k|        CLONE(ast_, AST_SELF, Self);
  ------------------
  |  |  355|  7.32k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 7.32k, False: 7.51M]
  |  |  ------------------
  |  |  356|  7.32k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  7.32k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  7.32k|     var = alloc.clone(ast); \
  |  |  359|  7.32k|   } break
  ------------------
  |  Branch (391:9): [True: 7.32k, False: 0]
  ------------------
  392|   151k|        CLONE(ast_, AST_SUPER_INDEX, SuperIndex);
  ------------------
  |  |  355|   151k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 151k, False: 7.36M]
  |  |  ------------------
  |  |  356|   151k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   151k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   151k|     var = alloc.clone(ast); \
  |  |  359|   151k|   } break
  ------------------
  |  Branch (392:9): [True: 151k, False: 0]
  ------------------
  393|  1.18M|        CLONE(ast_, AST_UNARY, Unary);
  ------------------
  |  |  355|  1.18M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.18M, False: 6.33M]
  |  |  ------------------
  |  |  356|  1.18M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.18M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.18M|     var = alloc.clone(ast); \
  |  |  359|  1.18M|   } break
  ------------------
  |  Branch (393:9): [True: 1.18M, False: 0]
  ------------------
  394|  1.52M|        CLONE(ast_, AST_VAR, Var);
  ------------------
  |  |  355|  1.52M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.52M, False: 5.99M]
  |  |  ------------------
  |  |  356|  1.52M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.52M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.52M|     var = alloc.clone(ast); \
  |  |  359|  1.52M|   } break
  ------------------
  |  Branch (394:9): [True: 1.52M, False: 0]
  ------------------
  395|      0|        default:
  ------------------
  |  Branch (395:9): [True: 0, False: 7.52M]
  ------------------
  396|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  397|      0|            std::abort();
  398|      0|            break;
  399|  7.52M|    }
  400|       |
  401|  7.52M|    CompilerPass::expr(ast_);
  402|  7.52M|}
_ZN7jsonnet8internal9clone_astERNS0_9AllocatorEPNS0_3ASTE:
  405|  41.4k|{
  406|  41.4k|    AST *r = ast;
  407|  41.4k|    ClonePass(alloc).expr(r);
  408|  41.4k|    return r;
  409|  41.4k|}
_ZN7jsonnet8internal9ClonePassC2ERNS0_9AllocatorE:
  350|  41.4k|    ClonePass(Allocator &alloc) : CompilerPass(alloc) {}

_ZN7jsonnet8internal12CompilerPassC2ERNS0_9AllocatorE:
   32|  55.3k|    CompilerPass(Allocator &alloc) : alloc(alloc) {}
_ZN7jsonnet8internal12CompilerPass13fodderElementERNS0_13FodderElementE:
   34|   246k|    virtual void fodderElement(FodderElement &) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_14LiteralBooleanE:
   84|  11.1k|    virtual void visit(LiteralBoolean *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_13LiteralNumberE:
   86|   589k|    virtual void visit(LiteralNumber *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_11LiteralNullE:
   90|  8.41k|    virtual void visit(LiteralNull *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_4SelfE:
  102|  7.32k|    virtual void visit(Self *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_3VarE:
  108|  1.78M|    virtual void visit(Var *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_13LiteralStringE:
   88|  1.35M|    virtual void visit(LiteralString *) {}

_ZN7jsonnet8internal32path_dir_with_trailing_separatorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   31|     45|std::string path_dir_with_trailing_separator(const std::string &path) {
   32|     45|    size_t last_slash = path.find_last_of(DIR_SEPARATORS);
   33|     45|    if (last_slash != std::string::npos) {
  ------------------
  |  Branch (33:9): [True: 0, False: 45]
  ------------------
   34|      0|        return path.substr(0, last_slash + 1);
   35|      0|    }
   36|     45|    return "";
   37|     45|}

vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14HeapC2Ejd:
  346|  2.87k|        : gcTuneMinObjects(gc_tune_min_objects),
  347|  2.87k|          gcTuneGrowthTrigger(gc_tune_growth_trigger),
  348|  2.87k|          lastMark(0),
  349|  2.87k|          lastNumEntities(0),
  350|  2.87k|          numEntities(0)
  351|  2.87k|    {
  352|  2.87k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18type_strENS1_5Value4TypeE:
   76|  1.11k|{
   77|  1.11k|    switch (t) {
   78|      3|        case Value::NULL_TYPE: return "null";
  ------------------
  |  Branch (78:9): [True: 3, False: 1.11k]
  ------------------
   79|    208|        case Value::BOOLEAN: return "boolean";
  ------------------
  |  Branch (79:9): [True: 208, False: 911]
  ------------------
   80|    243|        case Value::NUMBER: return "number";
  ------------------
  |  Branch (80:9): [True: 243, False: 876]
  ------------------
   81|     69|        case Value::ARRAY: return "array";
  ------------------
  |  Branch (81:9): [True: 69, False: 1.05k]
  ------------------
   82|      3|        case Value::FUNCTION: return "function";
  ------------------
  |  Branch (82:9): [True: 3, False: 1.11k]
  ------------------
   83|    129|        case Value::OBJECT: return "object";
  ------------------
  |  Branch (83:9): [True: 129, False: 990]
  ------------------
   84|    464|        case Value::STRING: return "string";
  ------------------
  |  Branch (84:9): [True: 464, False: 655]
  ------------------
   85|      0|        default:
  ------------------
  |  Branch (85:9): [True: 0, False: 1.11k]
  ------------------
   86|      0|            std::cerr << "INTERNAL ERROR: Unknown type: " << t << std::endl;
   87|      0|            std::abort();
   88|      0|            return "";  // Quiet, compiler.
   89|  1.11k|    }
   90|  1.11k|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18type_strERKNS1_5ValueE:
   94|    390|{
   95|    390|    return type_str(v.t);
   96|    390|}
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Value6isHeapEv:
   69|  45.4M|    {
   70|  45.4M|        return t & 0x10;
   71|  45.4M|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_111HeapClosure9isBuiltinEv:
  293|  19.2M|    bool isBuiltin() const { return !this->body || this->body->type == AST_BUILTIN_FUNCTION_BODY; }
  ------------------
  |  Branch (293:37): [True: 0, False: 19.2M]
  |  Branch (293:52): [True: 14.3M, False: 4.89M]
  ------------------
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapThunkC2EPKNS0_10IdentifierEPNS1_10HeapObjectEjPKNS0_3ASTE:
  140|  35.1M|        : HeapEntity(THUNK), filled(false), name(name), self(self), offset(offset), body(body)
  141|  35.1M|    {
  142|  35.1M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapEntityC2ENS2_4TypeE:
   43|  72.0M|    HeapEntity(Type type_) : type(type_) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapEntityD2Ev:
   44|  72.0M|    virtual ~HeapEntity() {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap9checkHeapEv:
  489|  72.0M|    {
  490|  72.0M|        return numEntities > gcTuneMinObjects &&
  ------------------
  |  Branch (490:16): [True: 32.6M, False: 39.3M]
  ------------------
  491|  32.6M|               numEntities > gcTuneGrowthTrigger * lastNumEntities;
  ------------------
  |  Branch (491:16): [True: 76.5k, False: 32.5M]
  ------------------
  492|  72.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromEPNS1_10HeapEntityE:
  369|  70.9M|    {
  370|  70.9M|        assert(from != nullptr);
  ------------------
  |  Branch (370:9): [True: 70.9M, False: 0]
  ------------------
  371|  70.9M|        const GarbageCollectionMark thisMark = lastMark + 1;
  372|  70.9M|        struct State {
  373|  70.9M|            HeapEntity *ent;
  374|  70.9M|            std::vector<HeapEntity *> children;
  375|  70.9M|            State(HeapEntity *ent) : ent(ent) {}
  376|  70.9M|        };
  377|       |
  378|  70.9M|        std::vector<State> stack;
  379|  70.9M|        stack.emplace_back(from);
  380|       |
  381|   307M|        while (stack.size() > 0) {
  ------------------
  |  Branch (381:16): [True: 236M, False: 70.9M]
  ------------------
  382|   236M|            size_t curr_index = stack.size() - 1;
  383|   236M|            State &s = stack[curr_index];
  384|   236M|            HeapEntity *curr = s.ent;
  385|   236M|            if (curr->mark != thisMark) {
  ------------------
  |  Branch (385:17): [True: 58.2M, False: 177M]
  ------------------
  386|  58.2M|                curr->mark = thisMark;
  387|       |
  388|  58.2M|                switch(curr->type) {
  389|  8.07M|                    case HeapEntity::SIMPLE_OBJECT: {
  ------------------
  |  Branch (389:21): [True: 8.07M, False: 50.1M]
  ------------------
  390|  8.07M|                        assert(dynamic_cast<HeapSimpleObject *>(curr));
  ------------------
  |  Branch (390:25): [True: 8.07M, False: 0]
  ------------------
  391|  8.07M|                        auto *obj = static_cast<HeapSimpleObject *>(curr);
  392|  8.07M|                        for (auto upv : obj->upValues)
  ------------------
  |  Branch (392:39): [True: 7.20M, False: 8.07M]
  ------------------
  393|  7.20M|                            addIfHeapEntity(upv.second, s.children);
  394|  8.07M|                        break;
  395|  8.07M|                    }
  396|  5.64M|                    case HeapEntity::EXTENDED_OBJECT: {
  ------------------
  |  Branch (396:21): [True: 5.64M, False: 52.5M]
  ------------------
  397|  5.64M|                        assert(dynamic_cast<HeapExtendedObject *>(curr));
  ------------------
  |  Branch (397:25): [True: 5.64M, False: 0]
  ------------------
  398|  5.64M|                        auto *obj = static_cast<HeapExtendedObject *>(curr);
  399|  5.64M|                        addIfHeapEntity(obj->left, s.children);
  400|  5.64M|                        addIfHeapEntity(obj->right, s.children);
  401|  5.64M|                        break;
  402|  5.64M|                    }
  403|      0|                    case HeapEntity::RESTRICTED_OBJECT: {
  ------------------
  |  Branch (403:21): [True: 0, False: 58.2M]
  ------------------
  404|      0|                        assert(dynamic_cast<HeapRestrictedObject *>(curr));
  ------------------
  |  Branch (404:25): [True: 0, False: 0]
  ------------------
  405|      0|                        auto *obj = static_cast<HeapRestrictedObject *>(curr);
  406|      0|                        addIfHeapEntity(obj->obj, s.children);
  407|      0|                        break;
  408|      0|                    }
  409|      0|                    case HeapEntity::COMPREHENSION_OBJECT: {
  ------------------
  |  Branch (409:21): [True: 0, False: 58.2M]
  ------------------
  410|      0|                        assert(dynamic_cast<HeapComprehensionObject *>(curr));
  ------------------
  |  Branch (410:25): [True: 0, False: 0]
  ------------------
  411|      0|                        auto *obj = static_cast<HeapComprehensionObject *>(curr);
  412|      0|                        for (auto upv : obj->upValues)
  ------------------
  |  Branch (412:39): [True: 0, False: 0]
  ------------------
  413|      0|                            addIfHeapEntity(upv.second, s.children);
  414|      0|                        for (auto upv : obj->compValues)
  ------------------
  |  Branch (414:39): [True: 0, False: 0]
  ------------------
  415|      0|                            addIfHeapEntity(upv.second, s.children);
  416|      0|                        break;
  417|      0|                    }
  418|  1.25M|                    case HeapEntity::ARRAY: {
  ------------------
  |  Branch (418:21): [True: 1.25M, False: 56.9M]
  ------------------
  419|  1.25M|                        assert(dynamic_cast<HeapArray *>(curr));
  ------------------
  |  Branch (419:25): [True: 1.25M, False: 0]
  ------------------
  420|  1.25M|                        auto *arr = static_cast<HeapArray *>(curr);
  421|  1.25M|                        for (auto el : arr->elements)
  ------------------
  |  Branch (421:38): [True: 17.5M, False: 1.25M]
  ------------------
  422|  17.5M|                            addIfHeapEntity(el, s.children);
  423|  1.25M|                        break;
  424|  1.25M|                    }
  425|  1.27M|                    case HeapEntity::CLOSURE: {
  ------------------
  |  Branch (425:21): [True: 1.27M, False: 56.9M]
  ------------------
  426|  1.27M|                        assert(dynamic_cast<HeapClosure *>(curr));
  ------------------
  |  Branch (426:25): [True: 1.27M, False: 0]
  ------------------
  427|  1.27M|                        auto *func = static_cast<HeapClosure *>(curr);
  428|  1.27M|                        for (auto upv : func->upValues)
  ------------------
  |  Branch (428:39): [True: 2.88M, False: 1.27M]
  ------------------
  429|  2.88M|                            addIfHeapEntity(upv.second, s.children);
  430|  1.27M|                        if (func->self)
  ------------------
  |  Branch (430:29): [True: 1.11M, False: 160k]
  ------------------
  431|  1.11M|                            addIfHeapEntity(func->self, s.children);
  432|  1.27M|                        break;
  433|  1.27M|                    }
  434|  41.1M|                    case HeapEntity::THUNK: {
  ------------------
  |  Branch (434:21): [True: 41.1M, False: 17.1M]
  ------------------
  435|  41.1M|                        assert(dynamic_cast<HeapThunk *>(curr));
  ------------------
  |  Branch (435:25): [True: 41.1M, False: 0]
  ------------------
  436|  41.1M|                        auto *thunk = static_cast<HeapThunk *>(curr);
  437|  41.1M|                        if (thunk->filled) {
  ------------------
  |  Branch (437:29): [True: 6.67M, False: 34.4M]
  ------------------
  438|  6.67M|                            if (thunk->content.isHeap())
  ------------------
  |  Branch (438:33): [True: 4.59M, False: 2.08M]
  ------------------
  439|  4.59M|                                addIfHeapEntity(thunk->content.v.h, s.children);
  440|  34.4M|                        } else {
  441|  34.4M|                            for (auto upv : thunk->upValues)
  ------------------
  |  Branch (441:43): [True: 4.82M, False: 34.4M]
  ------------------
  442|  4.82M|                                addIfHeapEntity(upv.second, s.children);
  443|  34.4M|                            if (thunk->self)
  ------------------
  |  Branch (443:33): [True: 33.1M, False: 1.30M]
  ------------------
  444|  33.1M|                                addIfHeapEntity(thunk->self, s.children);
  445|  34.4M|                        }
  446|  41.1M|                        break;
  447|  41.1M|                    }
  448|   862k|                    case HeapEntity::STRING:
  ------------------
  |  Branch (448:21): [True: 862k, False: 57.3M]
  ------------------
  449|   862k|                        assert(dynamic_cast<HeapString *>(curr));
  ------------------
  |  Branch (449:25): [True: 862k, False: 0]
  ------------------
  450|   862k|                        break;
  451|   862k|                    default:
  ------------------
  |  Branch (451:21): [True: 0, False: 58.2M]
  ------------------
  452|      0|                        assert(false);
  ------------------
  |  Branch (452:25): [Folded, False: 0]
  ------------------
  453|      0|                        break;
  454|  58.2M|                }
  455|  58.2M|            }
  456|       |
  457|   236M|            if (s.children.size() > 0) {
  ------------------
  |  Branch (457:17): [True: 82.6M, False: 153M]
  ------------------
  458|  82.6M|                HeapEntity *next = s.children[s.children.size() - 1];
  459|  82.6M|                s.children.pop_back();
  460|  82.6M|                stack.emplace_back(next);  // CAUTION: s invalidated here
  461|   153M|            } else {
  462|   153M|                stack.pop_back();  // CAUTION: s invalidated here
  463|   153M|            }
  464|   236M|        }
  465|  70.9M|    }
vm.cpp:_ZZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromEPNS1_10HeapEntityEEN5StateC2ES4_:
  375|   153M|            State(HeapEntity *ent) : ent(ent) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap15addIfHeapEntityEPNS1_10HeapEntityERNSt3__16vectorIS4_NS5_9allocatorIS4_EEEE:
  340|  82.6M|    {
  341|  82.6M|        vec.push_back(v);
  342|  82.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromENS1_5ValueE:
  362|  38.4M|    {
  363|  38.4M|        if (v.isHeap())
  ------------------
  |  Branch (363:13): [True: 10.0M, False: 28.3M]
  ------------------
  364|  10.0M|            markFrom(v.v.h);
  365|  38.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap5sweepEv:
  469|  79.3k|    {
  470|  79.3k|        lastMark++;
  471|       |        // Heap shrinks during this loop.  Do not cache entities.size().
  472|   130M|        for (unsigned long i = 0; i < entities.size(); ++i) {
  ------------------
  |  Branch (472:35): [True: 130M, False: 79.3k]
  ------------------
  473|   130M|            HeapEntity *x = entities[i];
  474|   130M|            if (x->mark != lastMark) {
  ------------------
  |  Branch (474:17): [True: 72.0M, False: 58.2M]
  ------------------
  475|  72.0M|                delete x;
  476|  72.0M|                if (i != entities.size() - 1) {
  ------------------
  |  Branch (476:21): [True: 71.9M, False: 67.0k]
  ------------------
  477|       |                    // Swap it with the back.
  478|  71.9M|                    entities[i] = entities[entities.size() - 1];
  479|  71.9M|                }
  480|  72.0M|                entities.pop_back();
  481|  72.0M|                --i;
  482|  72.0M|            }
  483|   130M|        }
  484|  79.3k|        lastNumEntities = numEntities = entities.size();
  485|  79.3k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapThunk4fillERKNS1_5ValueE:
  145|  16.3M|    {
  146|  16.3M|        content = v;
  147|  16.3M|        filled = true;
  148|  16.3M|        self = nullptr;
  149|  16.3M|        upValues.clear();
  150|  16.3M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapArrayEJRKNSt3__16vectorIPNS1_9HeapThunkENS5_9allocatorIS8_EEEEEEEPT_DpOT0_:
  501|  1.36M|    {
  502|  1.36M|        T *r = new T(std::forward<Args>(args)...);
  503|  1.36M|        entities.push_back(r);
  504|  1.36M|        r->mark = lastMark;
  505|  1.36M|        numEntities = entities.size();
  506|  1.36M|        return r;
  507|  1.36M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapArrayC2ERKNSt3__16vectorIPNS1_9HeapThunkENS3_9allocatorIS6_EEEE:
  159|  1.36M|        : HeapEntity(ARRAY), elements(elements)
  160|  1.36M|    {
  161|  1.36M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_10HeapStringEJRKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEEEEPT_DpOT0_:
  501|  26.0M|    {
  502|  26.0M|        T *r = new T(std::forward<Args>(args)...);
  503|  26.0M|        entities.push_back(r);
  504|  26.0M|        r->mark = lastMark;
  505|  26.0M|        numEntities = entities.size();
  506|  26.0M|        return r;
  507|  26.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapStringC2ERKNSt3__112basic_stringIDiNS3_11char_traitsIDiEENS3_9allocatorIDiEEEE:
  299|  26.0M|    HeapString(const UString &value) : HeapEntity(STRING), value(value) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierEDniDnEEEPT_DpOT0_:
  501|   655k|    {
  502|   655k|        T *r = new T(std::forward<Args>(args)...);
  503|   655k|        entities.push_back(r);
  504|   655k|        r->mark = lastMark;
  505|   655k|        numEntities = entities.size();
  506|   655k|        return r;
  507|   655k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_114HeapLeafObjectC2ENS1_10HeapEntity4TypeE:
  166|  1.54M|    HeapLeafObject(Type type) : HeapObject(type) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapObjectC2ENS1_10HeapEntity4TypeE:
  109|  2.51M|    HeapObject(Type type) : HeapEntity(type) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111HeapClosure5ParamC2EPKNS0_10IdentifierEPKNS0_3ASTE:
  275|  11.4M|        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_EEEEEEDniRNS5_6vectorINS4_5ParamENSE_ISL_EEEERPKNS0_19BuiltinFunctionBodyERKNS5_12basic_stringIcNS5_11char_traitsIcEENSE_IcEEEEEEEPT_DpOT0_:
  501|  5.55M|    {
  502|  5.55M|        T *r = new T(std::forward<Args>(args)...);
  503|  5.55M|        entities.push_back(r);
  504|  5.55M|        r->mark = lastMark;
  505|  5.55M|        numEntities = entities.size();
  506|  5.55M|        return r;
  507|  5.55M|    }
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:
  283|  6.93M|        : HeapEntity(CLOSURE),
  284|  6.93M|          upValues(up_values),
  285|  6.93M|          self(self),
  286|  6.93M|          offset(offset),
  287|  6.93M|          params(params),
  288|  6.93M|          body(body),
  289|  6.93M|          builtinName(builtin_name)
  290|  6.93M|    {
  291|  6.93M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJDnDniPKNS0_3ASTEEEEPT_DpOT0_:
  501|  2.87k|    {
  502|  2.87k|        T *r = new T(std::forward<Args>(args)...);
  503|  2.87k|        entities.push_back(r);
  504|  2.87k|        r->mark = lastMark;
  505|  2.87k|        numEntities = entities.size();
  506|  2.87k|        return r;
  507|  2.87k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJPNS0_10IdentifierERPNS1_10HeapObjectEiRKPNS0_3ASTEEEEPT_DpOT0_:
  501|   463k|    {
  502|   463k|        T *r = new T(std::forward<Args>(args)...);
  503|   463k|        entities.push_back(r);
  504|   463k|        r->mark = lastMark;
  505|   463k|        numEntities = entities.size();
  506|   463k|        return r;
  507|   463k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14HeapD2Ev:
  355|  2.87k|    {
  356|       |        // Nothing is marked, everything will be collected.
  357|  2.87k|        sweep();
  358|  2.87k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  501|  19.8M|    {
  502|  19.8M|        T *r = new T(std::forward<Args>(args)...);
  503|  19.8M|        entities.push_back(r);
  504|  19.8M|        r->mark = lastMark;
  505|  19.8M|        numEntities = entities.size();
  506|  19.8M|        return r;
  507|  19.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_11HeapClosureEJRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEERPNS1_10HeapObjectERjRKNS5_6vectorINS4_5ParamENSE_ISR_EEEERPNS0_3ASTERA1_KcEEEPT_DpOT0_:
  501|  1.38M|    {
  502|  1.38M|        T *r = new T(std::forward<Args>(args)...);
  503|  1.38M|        entities.push_back(r);
  504|  1.38M|        r->mark = lastMark;
  505|  1.38M|        numEntities = entities.size();
  506|  1.38M|        return r;
  507|  1.38M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRKPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  501|  12.3M|    {
  502|  12.3M|        T *r = new T(std::forward<Args>(args)...);
  503|  12.3M|        entities.push_back(r);
  504|  12.3M|        r->mark = lastMark;
  505|  12.3M|        numEntities = entities.size();
  506|  12.3M|        return r;
  507|  12.3M|    }
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_:
  501|  1.54M|    {
  502|  1.54M|        T *r = new T(std::forward<Args>(args)...);
  503|  1.54M|        entities.push_back(r);
  504|  1.54M|        r->mark = lastMark;
  505|  1.54M|        numEntities = entities.size();
  506|  1.54M|        return r;
  507|  1.54M|    }
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:
  196|  1.54M|        : HeapLeafObject(SIMPLE_OBJECT), upValues(up_values), fields(fields), asserts(asserts)
  197|  1.54M|    {
  198|  1.54M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPKNS0_3ASTEEEEPT_DpOT0_:
  501|    112|    {
  502|    112|        T *r = new T(std::forward<Args>(args)...);
  503|    112|        entities.push_back(r);
  504|    112|        r->mark = lastMark;
  505|    112|        numEntities = entities.size();
  506|    112|        return r;
  507|    112|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_18HeapExtendedObjectEJRPNS1_10HeapObjectES7_EEEPT_DpOT0_:
  501|   970k|    {
  502|   970k|        T *r = new T(std::forward<Args>(args)...);
  503|   970k|        entities.push_back(r);
  504|   970k|        r->mark = lastMark;
  505|   970k|        numEntities = entities.size();
  506|   970k|        return r;
  507|   970k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_118HeapExtendedObjectC2EPNS1_10HeapObjectES4_:
  210|   970k|        : HeapObject(EXTENDED_OBJECT), left(left), right(right)
  211|   970k|    {
  212|   970k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRPNS0_3ASTEEEEPT_DpOT0_:
  501|  1.82M|    {
  502|  1.82M|        T *r = new T(std::forward<Args>(args)...);
  503|  1.82M|        entities.push_back(r);
  504|  1.82M|        r->mark = lastMark;
  505|  1.82M|        numEntities = entities.size();
  506|  1.82M|        return r;
  507|  1.82M|    }

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

libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_11StaticErrorE:
  108|  3.31k|{
  109|  3.31k|    o << err.toString();
  110|  3.31k|    return o;
  111|  3.31k|}
_ZNK7jsonnet8internal11StaticError8toStringEv:
   97|  3.31k|    {
   98|  3.31k|        std::stringstream ss;
   99|  3.31k|        if (location.isSet()) {
  ------------------
  |  Branch (99:13): [True: 3.29k, False: 15]
  ------------------
  100|  3.29k|            ss << location << ":";
  101|  3.29k|        }
  102|  3.31k|        ss << " " << msg;
  103|  3.31k|        return ss.str();
  104|  3.31k|    }
_ZNK7jsonnet8internal13LocationRange5isSetEv:
   58|   325k|    {
   59|   325k|        return begin.isSet();
   60|   325k|    }
_ZNK7jsonnet8internal8Location5isSetEv:
   31|   325k|    {
   32|   325k|        return line != 0;
   33|   325k|    }
libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_13LocationRangeE:
   64|  21.3k|{
   65|  21.3k|    if (loc.file.length() > 0)
  ------------------
  |  Branch (65:9): [True: 7.92k, False: 13.4k]
  ------------------
   66|  7.92k|        o << loc.file;
   67|  21.3k|    if (loc.isSet()) {
  ------------------
  |  Branch (67:9): [True: 19.8k, False: 1.53k]
  ------------------
   68|  19.8k|        if (loc.file.length() > 0)
  ------------------
  |  Branch (68:13): [True: 6.50k, False: 13.3k]
  ------------------
   69|  6.50k|            o << ":";
   70|  19.8k|        if (loc.begin.line == loc.end.line) {
  ------------------
  |  Branch (70:13): [True: 17.0k, False: 2.80k]
  ------------------
   71|  17.0k|            if (loc.begin.column == loc.end.column - 1) {
  ------------------
  |  Branch (71:17): [True: 3.64k, False: 13.3k]
  ------------------
   72|  3.64k|                o << loc.begin;
   73|  13.3k|            } else {
   74|  13.3k|                o << loc.begin << "-" << loc.end.column;
   75|  13.3k|            }
   76|  17.0k|        } else {
   77|  2.80k|            o << "(" << loc.begin << ")-(" << loc.end << ")";
   78|  2.80k|        }
   79|  19.8k|    }
   80|  21.3k|    return o;
   81|  21.3k|}
libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_8LocationE:
   41|  22.6k|{
   42|  22.6k|    o << loc.line << ":" << loc.column;
   43|  22.6k|    return o;
   44|  22.6k|}
_ZN7jsonnet8internal8LocationC2Ev:
   28|  3.84M|    Location(void) : line(0), column(0) {}
_ZN7jsonnet8internal8LocationC2Emm:
   29|   175M|    Location(unsigned long line, unsigned long column) : line(line), column(column) {}
_ZNK7jsonnet8internal8Location9successorEv:
   35|    448|    {
   36|    448|        return Location(this->line, this->column + 1);
   37|    448|    }
_ZN7jsonnet8internal13LocationRangeC2Ev:
   50|  1.91M|    LocationRange(void) {}
_ZN7jsonnet8internal13LocationRangeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   52|  5.18k|    LocationRange(const std::string &msg) : file(msg) {}
_ZN7jsonnet8internal13LocationRangeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS0_8LocationESD_:
   54|   136M|        : file(file), begin(begin), end(end)
   55|   136M|    {
   56|   136M|    }
_ZN7jsonnet8internal11StaticErrorC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS0_8LocationESA_:
   88|    448|        : location(filename, location, location.successor()), msg(msg)
   89|    448|    {
   90|    448|    }
_ZN7jsonnet8internal11StaticErrorC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   92|  2.86k|        : location(location), msg(msg)
   93|  2.86k|    {
   94|  2.86k|    }

_ZN7jsonnet8internal22jsonnet_string_unparseERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEEb:
   25|   603k|{
   26|   603k|    UStringStream ss;
   27|   603k|    ss << (single ? U'\'' : U'\"');
  ------------------
  |  Branch (27:12): [True: 0, False: 603k]
  ------------------
   28|   603k|    ss << jsonnet_string_escape(str, single);
   29|   603k|    ss << (single ? U'\'' : U'\"');
  ------------------
  |  Branch (29:12): [True: 0, False: 603k]
  ------------------
   30|   603k|    return ss.str();
   31|   603k|}
_ZN7jsonnet8internal21jsonnet_string_escapeERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEEb:
   34|   603k|{
   35|   603k|    UStringStream ss;
   36|   633M|    for (std::size_t i = 0; i < str.length(); ++i) {
  ------------------
  |  Branch (36:29): [True: 633M, False: 603k]
  ------------------
   37|   633M|        char32_t c = str[i];
   38|   633M|        switch (c) {
   39|   774k|            case U'\"': ss << (single ? U"\"" : U"\\\""); break;
  ------------------
  |  Branch (39:13): [True: 774k, False: 632M]
  |  Branch (39:32): [True: 0, False: 774k]
  ------------------
   40|   756k|            case U'\'': ss << (single ? U"\\\'" : U"\'"); break;
  ------------------
  |  Branch (40:13): [True: 756k, False: 632M]
  |  Branch (40:32): [True: 0, False: 756k]
  ------------------
   41|   550M|            case U'\\': ss << U"\\\\"; break;
  ------------------
  |  Branch (41:13): [True: 550M, False: 83.3M]
  ------------------
   42|  1.35M|            case U'\b': ss << U"\\b"; break;
  ------------------
  |  Branch (42:13): [True: 1.35M, False: 632M]
  ------------------
   43|   163k|            case U'\f': ss << U"\\f"; break;
  ------------------
  |  Branch (43:13): [True: 163k, False: 633M]
  ------------------
   44|  6.55M|            case U'\n': ss << U"\\n"; break;
  ------------------
  |  Branch (44:13): [True: 6.55M, False: 626M]
  ------------------
   45|  93.2k|            case U'\r': ss << U"\\r"; break;
  ------------------
  |  Branch (45:13): [True: 93.2k, False: 633M]
  ------------------
   46|  1.19M|            case U'\t': ss << U"\\t"; break;
  ------------------
  |  Branch (46:13): [True: 1.19M, False: 632M]
  ------------------
   47|  73.0k|            case U'\0': ss << U"\\u0000"; break;
  ------------------
  |  Branch (47:13): [True: 73.0k, False: 633M]
  ------------------
   48|  72.3M|            default: {
  ------------------
  |  Branch (48:13): [True: 72.3M, False: 560M]
  ------------------
   49|  72.3M|                if (c < 0x20 || (c >= 0x7f && c <= 0x9f)) {
  ------------------
  |  Branch (49:21): [True: 6.09M, False: 66.2M]
  |  Branch (49:34): [True: 26.7M, False: 39.5M]
  |  Branch (49:47): [True: 835k, False: 25.8M]
  ------------------
   50|       |                    // Unprintable, use \u
   51|  6.93M|                    std::stringstream ss8;
   52|  6.93M|                    ss8 << "\\u" << std::hex << std::setfill('0') << std::setw(4)
   53|  6.93M|                        << (unsigned long)(c);
   54|  6.93M|                    ss << decode_utf8(ss8.str());
   55|  65.4M|                } else {
   56|       |                    // Printable, write verbatim
   57|  65.4M|                    ss << c;
   58|  65.4M|                }
   59|  72.3M|            }
   60|   633M|        }
   61|   633M|    }
   62|   603k|    return ss.str();
   63|   603k|}
_ZN7jsonnet8internal28jsonnet_string_parse_unicodeERKNS0_13LocationRangeEPKDi:
   66|  28.6k|{
   67|  28.6k|    unsigned long codepoint = 0;
   68|       |    // Expect 4 hex digits.
   69|   142k|    for (unsigned i = 0; i < 4; ++i) {
  ------------------
  |  Branch (69:26): [True: 114k, False: 28.5k]
  ------------------
   70|   114k|        auto x = (unsigned char)(c[i]);
   71|   114k|        unsigned digit;
   72|   114k|        if (x == '\0') {
  ------------------
  |  Branch (72:13): [True: 19, False: 114k]
  ------------------
   73|     19|            auto msg = "Truncated unicode escape sequence in string literal.";
   74|     19|            throw StaticError(loc, msg);
   75|   114k|        } else if (x >= '0' && x <= '9') {
  ------------------
  |  Branch (75:20): [True: 114k, False: 10]
  |  Branch (75:32): [True: 100k, False: 14.0k]
  ------------------
   76|   100k|            digit = x - '0';
   77|   100k|        } else if (x >= 'a' && x <= 'f') {
  ------------------
  |  Branch (77:20): [True: 2.51k, False: 11.5k]
  |  Branch (77:32): [True: 2.50k, False: 6]
  ------------------
   78|  2.50k|            digit = x - 'a' + 10;
   79|  11.5k|        } else if (x >= 'A' && x <= 'F') {
  ------------------
  |  Branch (79:20): [True: 11.5k, False: 13]
  |  Branch (79:32): [True: 11.4k, False: 14]
  ------------------
   80|  11.4k|            digit = x - 'A' + 10;
   81|  11.4k|        } else {
   82|     27|            std::stringstream ss;
   83|     27|            ss << "Malformed unicode escape character, "
   84|     27|               << "should be hex: '" << x << "'";
   85|     27|            throw StaticError(loc, ss.str());
   86|     27|        }
   87|   114k|        codepoint *= 16;
   88|   114k|        codepoint += digit;
   89|   114k|    }
   90|  28.5k|    return codepoint;
   91|  28.6k|}
_ZN7jsonnet8internal16is_bmp_codepointEm:
   94|  28.4k|{
   95|  28.4k|    return codepoint < 0xd800 || (codepoint >= 0xe000 && codepoint < 0x10000);
  ------------------
  |  Branch (95:12): [True: 27.5k, False: 879]
  |  Branch (95:35): [True: 721, False: 158]
  |  Branch (95:58): [True: 721, False: 0]
  ------------------
   96|  28.4k|}
_ZN7jsonnet8internal23decode_utf16_surrogatesERKNS0_13LocationRangeEmm:
   99|    134|{
  100|    134|    if (high >= 0xd800 && high < 0xdc00 && low >= 0xdc00 && low < 0xe000) {
  ------------------
  |  Branch (100:9): [True: 134, False: 0]
  |  Branch (100:27): [True: 130, False: 4]
  |  Branch (100:44): [True: 124, False: 6]
  |  Branch (100:61): [True: 122, False: 2]
  ------------------
  101|    122|        return 0x10000 + ((high & 0x03ff) << 10) + (low & 0x03ff);
  102|    122|    } else {
  103|     12|        std::stringstream ss;
  104|     12|        ss << "Invalid UTF-16 bytes";
  105|     12|        throw StaticError(loc, ss.str());
  106|     12|    }
  107|    134|}
_ZN7jsonnet8internal23jsonnet_string_unescapeERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS4_11char_traitsIDiEENS4_9allocatorIDiEEEE:
  110|  3.07M|{
  111|  3.07M|    UString r;
  112|  3.07M|    const char32_t *s_ptr = s.c_str();
  113|  65.4M|    for (const char32_t *c = s_ptr; *c != U'\0'; ++c) {
  ------------------
  |  Branch (113:37): [True: 62.3M, False: 3.07M]
  ------------------
  114|  62.3M|        switch (*c) {
  115|   382k|            case '\\':
  ------------------
  |  Branch (115:13): [True: 382k, False: 61.9M]
  ------------------
  116|   382k|                switch (*(++c)) {
  117|  13.6k|                    case '"':
  ------------------
  |  Branch (117:21): [True: 13.6k, False: 368k]
  ------------------
  118|  20.5k|                    case '\'': r += *c; break;
  ------------------
  |  Branch (118:21): [True: 6.94k, False: 375k]
  ------------------
  119|       |
  120|  71.0k|                    case '\\': r += *c; break;
  ------------------
  |  Branch (120:21): [True: 71.0k, False: 311k]
  ------------------
  121|       |
  122|    436|                    case '/': r += *c; break;
  ------------------
  |  Branch (122:21): [True: 436, False: 382k]
  ------------------
  123|       |
  124|  8.80k|                    case 'b': r += '\b'; break;
  ------------------
  |  Branch (124:21): [True: 8.80k, False: 373k]
  ------------------
  125|       |
  126|  30.6k|                    case 'f': r += '\f'; break;
  ------------------
  |  Branch (126:21): [True: 30.6k, False: 351k]
  ------------------
  127|       |
  128|   178k|                    case 'n': r += '\n'; break;
  ------------------
  |  Branch (128:21): [True: 178k, False: 203k]
  ------------------
  129|       |
  130|  13.1k|                    case 'r': r += '\r'; break;
  ------------------
  |  Branch (130:21): [True: 13.1k, False: 369k]
  ------------------
  131|       |
  132|  30.4k|                    case 't': r += '\t'; break;
  ------------------
  |  Branch (132:21): [True: 30.4k, False: 351k]
  ------------------
  133|       |
  134|  28.4k|                    case 'u': {
  ------------------
  |  Branch (134:21): [True: 28.4k, False: 353k]
  ------------------
  135|  28.4k|                        ++c;  // Consume the 'u'.
  136|  28.4k|                        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|  28.4k|                        c += 3;
  141|  28.4k|                        if (!is_bmp_codepoint(codepoint)) {
  ------------------
  |  Branch (141:29): [True: 158, False: 28.3k]
  ------------------
  142|    158|                           if (*(++c) != '\\') {
  ------------------
  |  Branch (142:32): [True: 13, False: 145]
  ------------------
  143|     13|                                std::stringstream ss;
  144|     13|                                ss << "Invalid non-BMP Unicode escape in string literal";
  145|     13|                                throw StaticError(loc, ss.str());
  146|     13|                           }
  147|    145|                           if (*(++c) != 'u') {
  ------------------
  |  Branch (147:32): [True: 7, False: 138]
  ------------------
  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|    138|                           ++c;
  153|    138|                           unsigned long codepoint2 = jsonnet_string_parse_unicode(loc, c);
  154|    138|                           c += 3;
  155|    138|                           codepoint = decode_utf16_surrogates(loc, codepoint, codepoint2);
  156|    138|                       }
  157|  28.4k|                       r += codepoint;
  158|  28.4k|                    } break;
  159|       |
  160|      2|                    case '\0': {
  ------------------
  |  Branch (160:21): [True: 2, False: 382k]
  ------------------
  161|      2|                        auto msg = "Truncated escape sequence in string literal.";
  162|      2|                        throw StaticError(loc, msg);
  163|  28.4k|                    }
  164|       |
  165|    112|                    default: {
  ------------------
  |  Branch (165:21): [True: 112, False: 382k]
  ------------------
  166|    112|                        std::stringstream ss;
  167|    112|                        std::string utf8;
  168|    112|                        encode_utf8(*c, utf8);
  169|    112|                        ss << "Unknown escape sequence in string literal: '" << utf8 << "'";
  170|    112|                        throw StaticError(loc, ss.str());
  171|  28.4k|                    }
  172|   382k|                }
  173|   382k|                break;
  174|       |
  175|  61.9M|            default:
  ------------------
  |  Branch (175:13): [True: 61.9M, False: 382k]
  ------------------
  176|       |                // Just a regular letter.
  177|  61.9M|                r += *c;
  178|  62.3M|        }
  179|  62.3M|    }
  180|  3.07M|    return r;
  181|  3.07M|}

_ZN7jsonnet8internal13UStringStreamlsERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  155|  24.0M|    {
  156|  24.0M|        buf.append(s);
  157|  24.0M|        return *this;
  158|  24.0M|    }
_ZN7jsonnet8internal13UStringStreamlsEPKDi:
  160|   568M|    {
  161|   568M|        buf.append(s);
  162|   568M|        return *this;
  163|   568M|    }
_ZN7jsonnet8internal13UStringStreamlsEDi:
  165|  66.6M|    {
  166|  66.6M|        buf.push_back(c);
  167|  66.6M|        return *this;
  168|  66.6M|    }
_ZN7jsonnet8internal13UStringStream3strEv:
  179|  7.70M|    {
  180|  7.70M|        return buf;
  181|  7.70M|    }
parser.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  30.5M|{
  141|  30.5M|    UString r;
  142|   222M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 191M, False: 30.5M]
  ------------------
  143|   191M|        r.push_back(decode_utf8(s, i));
  144|  30.5M|    return r;
  145|  30.5M|}
parser.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|   191M|{
   76|   191M|    char c0 = str[i];
   77|   191M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 182M, False: 9.17M]
  ------------------
   78|   182M|        return c0;
   79|   182M|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 366k, False: 8.80M]
  ------------------
   80|   366k|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 2.63k, False: 363k]
  ------------------
   81|  2.63k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  2.63k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|  2.63k|        }
   83|   363k|        char c1 = str[++i];
   84|   363k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 306k, False: 56.5k]
  ------------------
   85|   306k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   306k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|   306k|        }
   87|  56.5k|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|  8.80M|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 1.06M, False: 7.74M]
  ------------------
   89|  1.06M|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 823, False: 1.06M]
  ------------------
   90|    823|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|    823|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|    823|        }
   92|  1.06M|        char c1 = str[++i];
   93|  1.06M|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 1.00M, False: 59.7k]
  ------------------
   94|  1.00M|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  1.00M|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|  1.00M|        }
   96|  59.7k|        char c2 = str[++i];
   97|  59.7k|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 19.0k, False: 40.6k]
  ------------------
   98|  19.0k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  19.0k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|  19.0k|        }
  100|  40.6k|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|  7.74M|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 234k, False: 7.50M]
  ------------------
  102|   234k|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 1.39k, False: 232k]
  ------------------
  103|  1.39k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  1.39k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|  1.39k|        }
  105|   232k|        char c1 = str[++i];
  106|   232k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 190k, False: 42.1k]
  ------------------
  107|   190k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   190k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|   190k|        }
  109|  42.1k|        char c2 = str[++i];
  110|  42.1k|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 4.73k, False: 37.3k]
  ------------------
  111|  4.73k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  4.73k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|  4.73k|        }
  113|  37.3k|        char c3 = str[++i];
  114|  37.3k|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 11.2k, False: 26.1k]
  ------------------
  115|  11.2k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  11.2k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|  11.2k|        }
  117|  26.1k|        return ((c0 & 0x7) << 18ul) | ((c1 & 0x3F) << 12ul) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
  118|  7.50M|    } else {
  119|  7.50M|        return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  7.50M|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  120|  7.50M|    }
  121|   191M|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|    445|{
  134|    445|    std::string r;
  135|    445|    encode_utf8(s, r);
  136|    445|    return r;
  137|    445|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|    445|{
  128|    445|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 9.18M, False: 445]
  ------------------
  129|  9.18M|        encode_utf8(cp, r);
  130|    445|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  9.18M|{
   34|  9.18M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  9.18M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 0, False: 9.18M]
  ------------------
   35|      0|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  9.18M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  9.18M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 9.18M, False: 0]
  ------------------
   41|  9.18M|        s.push_back((char)x);
   42|  9.18M|        return 1;
   43|  9.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|  9.18M|}
string_utils.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  6.93M|{
  141|  6.93M|    UString r;
  142|  48.5M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 41.5M, False: 6.93M]
  ------------------
  143|  41.5M|        r.push_back(decode_utf8(s, i));
  144|  6.93M|    return r;
  145|  6.93M|}
string_utils.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  41.5M|{
   76|  41.5M|    char c0 = str[i];
   77|  41.5M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 41.5M, False: 0]
  ------------------
   78|  41.5M|        return c0;
   79|  41.5M|    } 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) << 18ul) | ((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|  41.5M|}
string_utils.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|    112|{
   34|    112|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|    112|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 1, False: 111]
  ------------------
   35|      1|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      1|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|    112|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|    112|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 59, False: 53]
  ------------------
   41|     59|        s.push_back((char)x);
   42|     59|        return 1;
   43|     59|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 7, False: 46]
  ------------------
   44|      7|        bytes |= 0xC080;
   45|      7|        s.push_back((bytes >> 8) & 0xFF);
   46|      7|        s.push_back((bytes >> 0) & 0xFF);
   47|      7|        return 2;
   48|     46|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 36, False: 10]
  ------------------
   49|     36|        bytes |= 0xE08080;
   50|     36|        s.push_back((bytes >> 16) & 0xFF);
   51|     36|        s.push_back((bytes >> 8) & 0xFF);
   52|     36|        s.push_back((bytes >> 0) & 0xFF);
   53|     36|        return 3;
   54|     36|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 10, False: 0]
  ------------------
   55|     10|        bytes |= 0xF0808080;
   56|     10|        s.push_back((bytes >> 24) & 0xFF);
   57|     10|        s.push_back((bytes >> 16) & 0xFF);
   58|     10|        s.push_back((bytes >> 8) & 0xFF);
   59|     10|        s.push_back((bytes >> 0) & 0xFF);
   60|     10|        return 4;
   61|     10|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|    112|}
vm.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  4.84M|{
  141|  4.84M|    UString r;
  142|  15.5M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 10.6M, False: 4.84M]
  ------------------
  143|  10.6M|        r.push_back(decode_utf8(s, i));
  144|  4.84M|    return r;
  145|  4.84M|}
vm.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  10.6M|{
   76|  10.6M|    char c0 = str[i];
   77|  10.6M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 10.6M, False: 0]
  ------------------
   78|  10.6M|        return c0;
   79|  10.6M|    } 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) << 18ul) | ((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|  10.6M|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|   560k|{
  134|   560k|    std::string r;
  135|   560k|    encode_utf8(s, r);
  136|   560k|    return r;
  137|   560k|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|   560k|{
  128|   560k|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 489M, False: 560k]
  ------------------
  129|   489M|        encode_utf8(cp, r);
  130|   560k|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|   489M|{
   34|   489M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|   489M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 839, False: 489M]
  ------------------
   35|    839|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|    839|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|   489M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|   489M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 487M, False: 1.52M]
  ------------------
   41|   487M|        s.push_back((char)x);
   42|   487M|        return 1;
   43|   487M|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 7.76k, False: 1.51M]
  ------------------
   44|  7.76k|        bytes |= 0xC080;
   45|  7.76k|        s.push_back((bytes >> 8) & 0xFF);
   46|  7.76k|        s.push_back((bytes >> 0) & 0xFF);
   47|  7.76k|        return 2;
   48|  1.51M|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 1.51M, False: 6.21k]
  ------------------
   49|  1.51M|        bytes |= 0xE08080;
   50|  1.51M|        s.push_back((bytes >> 16) & 0xFF);
   51|  1.51M|        s.push_back((bytes >> 8) & 0xFF);
   52|  1.51M|        s.push_back((bytes >> 0) & 0xFF);
   53|  1.51M|        return 3;
   54|  1.51M|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 6.21k, False: 0]
  ------------------
   55|  6.21k|        bytes |= 0xF0808080;
   56|  6.21k|        s.push_back((bytes >> 24) & 0xFF);
   57|  6.21k|        s.push_back((bytes >> 16) & 0xFF);
   58|  6.21k|        s.push_back((bytes >> 8) & 0xFF);
   59|  6.21k|        s.push_back((bytes >> 0) & 0xFF);
   60|  6.21k|        return 4;
   61|  6.21k|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|   489M|}
_ZN7jsonnet8internal13UStringStreamlsIiEERS1_T_:
  171|   834k|    {
  172|   834k|        std::stringstream ss;
  173|   834k|        ss << c;
  174|   834k|        for (char c : ss.str())
  ------------------
  |  Branch (174:21): [True: 1.63M, False: 834k]
  ------------------
  175|  1.63M|            buf.push_back(char32_t(c));
  176|   834k|        return *this;
  177|   834k|    }
_ZN7jsonnet8internal13UStringStreamlsIjEERS1_T_:
  171|   136k|    {
  172|   136k|        std::stringstream ss;
  173|   136k|        ss << c;
  174|   136k|        for (char c : ss.str())
  ------------------
  |  Branch (174:21): [True: 407k, False: 136k]
  ------------------
  175|   407k|            buf.push_back(char32_t(c));
  176|   136k|        return *this;
  177|   136k|    }
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|   262k|{
  134|   262k|    std::string r;
  135|   262k|    encode_utf8(s, r);
  136|   262k|    return r;
  137|   262k|}
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|   262k|{
  128|   262k|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 1.75M, False: 262k]
  ------------------
  129|  1.75M|        encode_utf8(cp, r);
  130|   262k|}
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  1.75M|{
   34|  1.75M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  1.75M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 0, False: 1.75M]
  ------------------
   35|      0|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  1.75M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  1.75M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 1.75M, False: 0]
  ------------------
   41|  1.75M|        s.push_back((char)x);
   42|  1.75M|        return 1;
   43|  1.75M|    } 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|  1.75M|}
desugarer.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  6.24k|{
  141|  6.24k|    UString r;
  142|  40.7k|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 34.5k, False: 6.24k]
  ------------------
  143|  34.5k|        r.push_back(decode_utf8(s, i));
  144|  6.24k|    return r;
  145|  6.24k|}
desugarer.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  34.5k|{
   76|  34.5k|    char c0 = str[i];
   77|  34.5k|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 34.5k, False: 0]
  ------------------
   78|  34.5k|        return c0;
   79|  34.5k|    } 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) << 18ul) | ((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|  34.5k|}

_ZN7jsonnet8internal24jsonnet_vm_execute_multiEPNS0_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:
 3520|  2.87k|{
 3521|  2.87k|    Interpreter vm(alloc,
 3522|  2.87k|                   ext_vars,
 3523|  2.87k|                   max_stack,
 3524|  2.87k|                   gc_min_objects,
 3525|  2.87k|                   gc_growth_trigger,
 3526|  2.87k|                   natives,
 3527|  2.87k|                   import_callback,
 3528|  2.87k|                   ctx);
 3529|  2.87k|    vm.evaluate(ast, 0);
 3530|  2.87k|    return vm.manifestMulti(string_output);
 3531|  2.87k|}
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_:
  945|  2.87k|        : heap(gc_min_objects, gc_growth_trigger),
  946|  2.87k|          stack(max_stack),
  947|  2.87k|          alloc(alloc),
  948|  2.87k|          idImport(alloc->makeIdentifier(U"import")),
  949|  2.87k|          idArrayElement(alloc->makeIdentifier(U"array_element")),
  950|  2.87k|          idInvariant(alloc->makeIdentifier(U"object_assert")),
  951|  2.87k|          idInternal(alloc->makeIdentifier(U"__internal__")),
  952|  2.87k|          idJsonObjVar(alloc->makeIdentifier(U"_")),
  953|  2.87k|          idEmpty(alloc->makeIdentifier(U"")),
  954|  2.87k|          jsonObjVar(alloc->make<Var>(LocationRange(), Fodder{}, idJsonObjVar)),
  955|  2.87k|          externalVars(ext_vars),
  956|  2.87k|          importCallback(import_callback),
  957|  2.87k|          importCallbackContext(import_callback_context)
  958|  2.87k|    {
  959|  2.87k|        scratch = makeNull();
  960|       |        // Add a prefix to avoid conflicting with names from `native_callbacks`.
  961|  2.87k|        builtins["std:makeArray"] = &Interpreter::builtinMakeArray;
  962|  2.87k|        builtins["std:pow"] = &Interpreter::builtinPow;
  963|  2.87k|        builtins["std:floor"] = &Interpreter::builtinFloor;
  964|  2.87k|        builtins["std:ceil"] = &Interpreter::builtinCeil;
  965|  2.87k|        builtins["std:sqrt"] = &Interpreter::builtinSqrt;
  966|  2.87k|        builtins["std:sin"] = &Interpreter::builtinSin;
  967|  2.87k|        builtins["std:cos"] = &Interpreter::builtinCos;
  968|  2.87k|        builtins["std:tan"] = &Interpreter::builtinTan;
  969|  2.87k|        builtins["std:asin"] = &Interpreter::builtinAsin;
  970|  2.87k|        builtins["std:acos"] = &Interpreter::builtinAcos;
  971|  2.87k|        builtins["std:atan"] = &Interpreter::builtinAtan;
  972|  2.87k|        builtins["std:type"] = &Interpreter::builtinType;
  973|  2.87k|        builtins["std:filter"] = &Interpreter::builtinFilter;
  974|  2.87k|        builtins["std:objectHasEx"] = &Interpreter::builtinObjectHasEx;
  975|  2.87k|        builtins["std:length"] = &Interpreter::builtinLength;
  976|  2.87k|        builtins["std:objectFieldsEx"] = &Interpreter::builtinObjectFieldsEx;
  977|  2.87k|        builtins["std:objectRemoveKey"] = &Interpreter::builtinObjectRemoveKey;
  978|  2.87k|        builtins["std:codepoint"] = &Interpreter::builtinCodepoint;
  979|  2.87k|        builtins["std:char"] = &Interpreter::builtinChar;
  980|  2.87k|        builtins["std:log"] = &Interpreter::builtinLog;
  981|  2.87k|        builtins["std:exp"] = &Interpreter::builtinExp;
  982|  2.87k|        builtins["std:mantissa"] = &Interpreter::builtinMantissa;
  983|  2.87k|        builtins["std:exponent"] = &Interpreter::builtinExponent;
  984|  2.87k|        builtins["std:modulo"] = &Interpreter::builtinModulo;
  985|  2.87k|        builtins["std:extVar"] = &Interpreter::builtinExtVar;
  986|  2.87k|        builtins["std:primitiveEquals"] = &Interpreter::builtinPrimitiveEquals;
  987|  2.87k|        builtins["std:native"] = &Interpreter::builtinNative;
  988|  2.87k|        builtins["std:md5"] = &Interpreter::builtinMd5;
  989|  2.87k|        builtins["std:trace"] = &Interpreter::builtinTrace;
  990|  2.87k|        builtins["std:splitLimit"] = &Interpreter::builtinSplitLimit;
  991|  2.87k|        builtins["std:substr"] = &Interpreter::builtinSubstr;
  992|  2.87k|        builtins["std:range"] = &Interpreter::builtinRange;
  993|  2.87k|        builtins["std:strReplace"] = &Interpreter::builtinStrReplace;
  994|  2.87k|        builtins["std:asciiLower"] = &Interpreter::builtinAsciiLower;
  995|  2.87k|        builtins["std:asciiUpper"] = &Interpreter::builtinAsciiUpper;
  996|  2.87k|        builtins["std:join"] = &Interpreter::builtinJoin;
  997|  2.87k|        builtins["std:parseJson"] = &Interpreter::builtinParseJson;
  998|  2.87k|        builtins["std:parseYaml"] = &Interpreter::builtinParseYaml;
  999|  2.87k|        builtins["std:encodeUTF8"] = &Interpreter::builtinEncodeUTF8;
 1000|  2.87k|        builtins["std:decodeUTF8"] = &Interpreter::builtinDecodeUTF8;
 1001|  2.87k|        builtins["std:atan2"] = &Interpreter::builtinAtan2;
 1002|  2.87k|        builtins["std:hypot"] = &Interpreter::builtinHypot;
 1003|       |
 1004|       |        // Add a prefix `native:` to names of provided callbacks to ensure they can't clash with the builtins above.
 1005|       |        // Although we have separate lookup tables for them, the HeapClosure and BuiltinFunctionBody types just hold
 1006|       |        // function "name" as a std::string to identify the function.
 1007|  2.87k|        for (const auto& [name, cb] : native_callbacks) {
  ------------------
  |  Branch (1007:37): [True: 0, False: 2.87k]
  ------------------
 1008|      0|            nativeCallbacks.emplace("native:" + name, cb);
 1009|      0|        }
 1010|       |
 1011|  2.87k|        DesugaredObject *stdlib = makeStdlibAST(alloc, "__internal__");
 1012|  2.87k|        jsonnet_static_analysis(stdlib);
 1013|  2.87k|        stdlibAST = stdlib; // stdlibAST is const, so we need to do analysis before this assignment
 1014|  2.87k|        auto stdThunk = makeHeap<HeapThunk>(nullptr, nullptr, 0, static_cast<const AST*>(stdlibAST));
 1015|  2.87k|        stack.newCall(stdThunk->body->location, stdThunk, stdThunk->self, stdThunk->offset, stdThunk->upValues);
 1016|  2.87k|        evaluate(stdThunk->body, 0);
 1017|  2.87k|        stdObject = dynamic_cast<HeapObject*>(scratch.v.h);
 1018|  2.87k|        prepareSourceValThunks();
 1019|  2.87k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15StackC2Ej:
  258|  2.87k|    Stack(unsigned limit) : calls(0), limit(limit) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeNullEv:
  634|  24.4k|    {
  635|  24.4k|        Value r;
  636|  24.4k|        r.t = Value::NULL_TYPE;
  637|  24.4k|        return r;
  638|  24.4k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack3topEv:
  291|   402M|    {
  292|   402M|        return stack.back();
  293|   402M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter19validateBuiltinArgsERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_6vectorINS1_5ValueENSA_ISG_EEEENSF_INSG_4TypeENSA_ISL_EEEE:
 1043|   176k|    {
 1044|   176k|        if (args.size() == params.size()) {
  ------------------
  |  Branch (1044:13): [True: 176k, False: 0]
  ------------------
 1045|   493k|            for (std::size_t i = 0; i < args.size(); ++i) {
  ------------------
  |  Branch (1045:37): [True: 317k, False: 176k]
  ------------------
 1046|   317k|                if (args[i].t != params[i])
  ------------------
  |  Branch (1046:21): [True: 0, False: 317k]
  ------------------
 1047|      0|                    goto bad;
 1048|   317k|            }
 1049|   176k|            return;
 1050|   176k|        }
 1051|      0|    bad:;
 1052|      0|        std::stringstream ss;
 1053|      0|        ss << "Builtin function " + name + " expected (";
 1054|      0|        const char *prefix = "";
 1055|      0|        for (auto p : params) {
  ------------------
  |  Branch (1055:21): [True: 0, False: 0]
  ------------------
 1056|      0|            ss << prefix << type_str(p);
 1057|      0|            prefix = ", ";
 1058|      0|        }
 1059|      0|        ss << ") but got (";
 1060|      0|        prefix = "";
 1061|      0|        for (auto a : args) {
  ------------------
  |  Branch (1061:21): [True: 0, False: 0]
  ------------------
 1062|      0|            ss << prefix << type_str(a);
 1063|      0|            prefix = ", ";
 1064|      0|        }
 1065|      0|        ss << ")";
 1066|      0|        throw makeError(loc, ss.str());
 1067|   176k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter9makeErrorERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  567|  1.88k|    {
  568|  1.88k|        return stack.makeError(loc, msg);
  569|  1.88k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack9makeErrorERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  368|  2.45k|    {
  369|  2.45k|        std::vector<TraceFrame> stack_trace;
  370|  2.45k|        stack_trace.push_back(TraceFrame(loc));
  371|  1.05M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (371:40): [True: 1.04M, False: 2.45k]
  ------------------
  372|  1.04M|            const auto &f = stack[i];
  373|  1.04M|            if (f.isCall()) {
  ------------------
  |  Branch (373:17): [True: 300k, False: 748k]
  ------------------
  374|   300k|                if (f.context != nullptr) {
  ------------------
  |  Branch (374:21): [True: 300k, False: 0]
  ------------------
  375|       |                    // Give the last line a name.
  376|   300k|                    stack_trace[stack_trace.size() - 1].name = getName(i, f.context);
  377|   300k|                }
  378|   300k|                if (f.location.isSet() || f.location.file.length() > 0)
  ------------------
  |  Branch (378:21): [True: 245k, False: 55.7k]
  |  Branch (378:43): [True: 678, False: 55.1k]
  ------------------
  379|   245k|                    stack_trace.push_back(TraceFrame(f.location));
  380|   300k|            }
  381|  1.04M|        }
  382|  2.45k|        return RuntimeError(stack_trace, msg);
  383|  2.45k|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Frame6isCallEv:
  241|   462M|    {
  242|   462M|        return kind == FRAME_CALL;
  243|   462M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack7getNameEjPKNS1_10HeapEntityE:
  313|   300k|    {
  314|   300k|        std::string name;
  315|  1.04M|        for (int i = from_here - 1; i >= 0; --i) {
  ------------------
  |  Branch (315:37): [True: 1.03M, False: 1.72k]
  ------------------
  316|  1.03M|            const auto &f = stack[i];
  317|  1.03M|            for (const auto &pair : f.bindings) {
  ------------------
  |  Branch (317:35): [True: 467k, False: 1.03M]
  ------------------
  318|   467k|                HeapThunk *thunk = pair.second;
  319|   467k|                if (!thunk->filled)
  ------------------
  |  Branch (319:21): [True: 133k, False: 333k]
  ------------------
  320|   133k|                    continue;
  321|   333k|                if (!thunk->content.isHeap())
  ------------------
  |  Branch (321:21): [True: 38.6k, False: 295k]
  ------------------
  322|  38.6k|                    continue;
  323|   295k|                if (e != thunk->content.v.h)
  ------------------
  |  Branch (323:21): [True: 262k, False: 33.2k]
  ------------------
  324|   262k|                    continue;
  325|  33.2k|                name = encode_utf8(pair.first->name);
  326|  33.2k|            }
  327|       |            // Do not go into the next call frame, keep local reasoning.
  328|  1.03M|            if (f.isCall())
  ------------------
  |  Branch (328:17): [True: 299k, False: 740k]
  ------------------
  329|   299k|                break;
  330|  1.03M|        }
  331|       |
  332|   300k|        if (name == "")
  ------------------
  |  Branch (332:13): [True: 267k, False: 33.2k]
  ------------------
  333|   267k|            name = "anonymous";
  334|   300k|        if (dynamic_cast<const HeapObject *>(e)) {
  ------------------
  |  Branch (334:13): [True: 198k, False: 102k]
  ------------------
  335|   198k|            return "object <" + name + ">";
  336|   198k|        } else if (auto *thunk = dynamic_cast<const HeapThunk *>(e)) {
  ------------------
  |  Branch (336:26): [True: 62.0k, False: 40.7k]
  ------------------
  337|  62.0k|            if (thunk->name == nullptr) {
  ------------------
  |  Branch (337:17): [True: 6.04k, False: 56.0k]
  ------------------
  338|  6.04k|                return "";  // Argument of builtin, or root (since top level functions).
  339|  56.0k|            } else {
  340|  56.0k|                return "thunk <" + encode_utf8(thunk->name->name) + ">";
  341|  56.0k|            }
  342|  62.0k|        } else {
  343|  40.7k|            const auto *func = static_cast<const HeapClosure *>(e);
  344|  40.7k|            if (func->isBuiltin()) {
  ------------------
  |  Branch (344:17): [True: 0, False: 40.7k]
  ------------------
  345|      0|                return "builtin function <" + func->builtinName + ">";
  346|      0|            }
  347|  40.7k|            return "function <" + name + ">";
  348|  40.7k|        }
  349|   300k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack4markERNS1_4HeapE:
  284|  76.5k|    {
  285|  19.1M|        for (const auto &f : stack) {
  ------------------
  |  Branch (285:28): [True: 19.1M, False: 76.5k]
  ------------------
  286|  19.1M|            f.mark(heap);
  287|  19.1M|        }
  288|  76.5k|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Frame4markERNS1_4HeapE:
  225|  19.1M|    {
  226|  19.1M|        heap.markFrom(val);
  227|  19.1M|        heap.markFrom(val2);
  228|  19.1M|        if (context)
  ------------------
  |  Branch (228:13): [True: 13.1M, False: 5.96M]
  ------------------
  229|  13.1M|            heap.markFrom(context);
  230|  19.1M|        if (self)
  ------------------
  |  Branch (230:13): [True: 13.2M, False: 5.96M]
  ------------------
  231|  13.2M|            heap.markFrom(self);
  232|  19.1M|        for (const auto &bind : bindings)
  ------------------
  |  Branch (232:31): [True: 18.5M, False: 19.1M]
  ------------------
  233|  18.5M|            heap.markFrom(bind.second);
  234|  19.1M|        for (const auto &el : elements)
  ------------------
  |  Branch (234:29): [True: 0, False: 19.1M]
  ------------------
  235|      0|            heap.markFrom(el.second);
  236|  19.1M|        for (const auto &th : thunks)
  ------------------
  |  Branch (236:29): [True: 3.53M, False: 19.1M]
  ------------------
  237|  3.53M|            heap.markFrom(th);
  238|  19.1M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeNumberEd:
  615|  6.24M|    {
  616|  6.24M|        Value r;
  617|  6.24M|        r.t = Value::NUMBER;
  618|  6.24M|        r.v.d = v;
  619|  6.24M|        return r;
  620|  6.24M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter9makeArrayERKNSt3__16vectorIPNS1_9HeapThunkENS3_9allocatorIS6_EEEE:
  641|  1.36M|    {
  642|  1.36M|        Value r;
  643|  1.36M|        r.t = Value::ARRAY;
  644|  1.36M|        r.v.h = makeHeap<HeapArray>(v);
  645|  1.36M|        return r;
  646|  1.36M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapArrayEJRKNSt3__16vectorIPNS1_9HeapThunkENS5_9allocatorIS8_EEEEEEEPT_DpOT0_:
  577|  1.36M|    {
  578|  1.36M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  1.36M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 2.33k, False: 1.36M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  2.33k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  2.33k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  2.33k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  2.33k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 2.33k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|   376k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 376k, False: 2.33k]
  ------------------
  597|   376k|                heap.markFrom(sourceVal.second);
  598|   376k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  2.33k|            heap.sweep();
  602|  2.33k|        }
  603|  1.36M|        return r;
  604|  1.36M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10builtinPowERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1103|  2.59k|    {
 1104|  2.59k|        validateBuiltinArgs(loc, "pow", args, {Value::NUMBER, Value::NUMBER});
 1105|  2.59k|        scratch = makeNumberCheck(loc, std::pow(args[0].v.d, args[1].v.d));
 1106|  2.59k|        return nullptr;
 1107|  2.59k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter15makeNumberCheckERKNS0_13LocationRangeEd:
  623|  5.70M|    {
  624|  5.70M|        if (std::isnan(v)) {
  ------------------
  |  Branch (624:13): [True: 0, False: 5.70M]
  ------------------
  625|      0|            throw makeError(loc, "not a number");
  626|      0|        }
  627|  5.70M|        if (std::isinf(v)) {
  ------------------
  |  Branch (627:13): [True: 16, False: 5.70M]
  ------------------
  628|     16|            throw makeError(loc, "overflow");
  629|     16|        }
  630|  5.70M|        return makeNumber(v);
  631|  5.70M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12builtinFloorERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1110|  30.1k|    {
 1111|  30.1k|        validateBuiltinArgs(loc, "floor", args, {Value::NUMBER});
 1112|  30.1k|        scratch = makeNumberCheck(loc, std::floor(args[0].v.d));
 1113|  30.1k|        return nullptr;
 1114|  30.1k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11builtinTypeERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1187|  1.88M|    {
 1188|  1.88M|        switch (args[0].t) {
  ------------------
  |  Branch (1188:17): [True: 1.88M, False: 0]
  ------------------
 1189|  20.9k|            case Value::NULL_TYPE: scratch = makeString(U"null"); return nullptr;
  ------------------
  |  Branch (1189:13): [True: 20.9k, False: 1.86M]
  ------------------
 1190|       |
 1191|   108k|            case Value::BOOLEAN: scratch = makeString(U"boolean"); return nullptr;
  ------------------
  |  Branch (1191:13): [True: 108k, False: 1.77M]
  ------------------
 1192|       |
 1193|   269k|            case Value::NUMBER: scratch = makeString(U"number"); return nullptr;
  ------------------
  |  Branch (1193:13): [True: 269k, False: 1.61M]
  ------------------
 1194|       |
 1195|   158k|            case Value::ARRAY: scratch = makeString(U"array"); return nullptr;
  ------------------
  |  Branch (1195:13): [True: 158k, False: 1.72M]
  ------------------
 1196|       |
 1197|     32|            case Value::FUNCTION: scratch = makeString(U"function"); return nullptr;
  ------------------
  |  Branch (1197:13): [True: 32, False: 1.88M]
  ------------------
 1198|       |
 1199|   110k|            case Value::OBJECT: scratch = makeString(U"object"); return nullptr;
  ------------------
  |  Branch (1199:13): [True: 110k, False: 1.77M]
  ------------------
 1200|       |
 1201|  1.21M|            case Value::STRING: scratch = makeString(U"string"); return nullptr;
  ------------------
  |  Branch (1201:13): [True: 1.21M, False: 667k]
  ------------------
 1202|  1.88M|        }
 1203|      0|        return nullptr;  // Quiet, compiler.
 1204|  1.88M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeStringERKNSt3__112basic_stringIDiNS3_11char_traitsIDiEENS3_9allocatorIDiEEEE:
  679|  26.0M|    {
  680|  26.0M|        Value r;
  681|  26.0M|        r.t = Value::STRING;
  682|  26.0M|        r.v.h = makeHeap<HeapString>(v);
  683|  26.0M|        return r;
  684|  26.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_10HeapStringEJRKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEEEEPT_DpOT0_:
  577|  26.0M|    {
  578|  26.0M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  26.0M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 28.4k, False: 26.0M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  28.4k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  28.4k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  28.4k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  28.4k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 28.4k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|  4.58M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 4.58M, False: 28.4k]
  ------------------
  597|  4.58M|                heap.markFrom(sourceVal.second);
  598|  4.58M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  28.4k|            heap.sweep();
  602|  28.4k|        }
  603|  26.0M|        return r;
  604|  26.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12objectFieldsEPKNS1_10HeapObjectEb:
  773|   712k|    {
  774|   712k|        std::set<const Identifier *> r;
  775|  1.40M|        for (const auto &pair : objectFieldsAux(obj_)) {
  ------------------
  |  Branch (775:31): [True: 1.40M, False: 712k]
  ------------------
  776|  1.40M|            if (!manifesting || pair.second != ObjectField::HIDDEN)
  ------------------
  |  Branch (776:17): [True: 0, False: 1.40M]
  |  Branch (776:33): [True: 1.40M, False: 2.74k]
  ------------------
  777|  1.40M|                r.insert(pair.first);
  778|  1.40M|        }
  779|   712k|        return r;
  780|   712k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter15objectFieldsAuxEPKNS1_10HeapObjectE:
  740|  30.0M|    {
  741|  30.0M|        IdHideMap r;
  742|  30.0M|        if (auto *obj = dynamic_cast<const HeapSimpleObject *>(obj_)) {
  ------------------
  |  Branch (742:19): [True: 15.3M, False: 14.6M]
  ------------------
  743|  15.3M|            for (const auto &f : obj->fields) {
  ------------------
  |  Branch (743:32): [True: 9.35M, False: 15.3M]
  ------------------
  744|  9.35M|                r[f.first] = f.second.hide;
  745|  9.35M|            }
  746|       |
  747|  15.3M|        } else if (auto *obj = dynamic_cast<const HeapRestrictedObject *>(obj_)) {
  ------------------
  |  Branch (747:26): [True: 0, False: 14.6M]
  ------------------
  748|      0|            return obj->retainedKeys;
  749|       |
  750|  14.6M|        } else if (auto *obj = dynamic_cast<const HeapExtendedObject *>(obj_)) {
  ------------------
  |  Branch (750:26): [True: 14.6M, False: 0]
  ------------------
  751|  14.6M|            r = objectFieldsAux(obj->right);
  752|  29.8M|            for (const auto &pair : objectFieldsAux(obj->left)) {
  ------------------
  |  Branch (752:35): [True: 29.8M, False: 14.6M]
  ------------------
  753|  29.8M|                auto it = r.find(pair.first);
  754|  29.8M|                if (it == r.end()) {
  ------------------
  |  Branch (754:21): [True: 21.9M, False: 7.94M]
  ------------------
  755|       |                    // First time it is seen
  756|  21.9M|                    r[pair.first] = pair.second;
  757|  21.9M|                } else if (it->second == ObjectField::INHERIT) {
  ------------------
  |  Branch (757:28): [True: 7.61M, False: 328k]
  ------------------
  758|       |                    // Seen before, but with inherited visibility so use new visibility
  759|  7.61M|                    r[pair.first] = pair.second;
  760|  7.61M|                }
  761|  29.8M|            }
  762|       |
  763|  14.6M|        } else if (auto *obj = dynamic_cast<const HeapComprehensionObject *>(obj_)) {
  ------------------
  |  Branch (763:26): [True: 0, False: 0]
  ------------------
  764|      0|            for (const auto &f : obj->compValues)
  ------------------
  |  Branch (764:32): [True: 0, False: 0]
  ------------------
  765|      0|                r[f.first] = ObjectField::INHERIT;
  766|      0|        }
  767|  30.0M|        return r;
  768|  30.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeBooleanEb:
  607|  7.05M|    {
  608|  7.05M|        Value r;
  609|  7.05M|        r.t = Value::BOOLEAN;
  610|  7.05M|        r.v.b = v;
  611|  7.05M|        return r;
  612|  7.05M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinLengthERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1252|   398k|    {
 1253|   398k|        if (args.size() != 1) {
  ------------------
  |  Branch (1253:13): [True: 0, False: 398k]
  ------------------
 1254|      0|            throw makeError(loc, "length takes 1 parameter.");
 1255|      0|        }
 1256|   398k|        HeapEntity *e = args[0].v.h;
 1257|   398k|        switch (args[0].t) {
 1258|      0|            case Value::OBJECT: {
  ------------------
  |  Branch (1258:13): [True: 0, False: 398k]
  ------------------
 1259|      0|                auto fields = objectFields(static_cast<HeapObject *>(e), true);
 1260|      0|                scratch = makeNumber(fields.size());
 1261|      0|            } break;
 1262|       |
 1263|   238k|            case Value::ARRAY:
  ------------------
  |  Branch (1263:13): [True: 238k, False: 159k]
  ------------------
 1264|   238k|                scratch = makeNumber(static_cast<HeapArray *>(e)->elements.size());
 1265|   238k|                break;
 1266|       |
 1267|   159k|            case Value::STRING:
  ------------------
  |  Branch (1267:13): [True: 159k, False: 238k]
  ------------------
 1268|   159k|                scratch = makeNumber(static_cast<HeapString *>(e)->value.length());
 1269|   159k|                break;
 1270|       |
 1271|      0|            case Value::FUNCTION:
  ------------------
  |  Branch (1271:13): [True: 0, False: 398k]
  ------------------
 1272|      0|                scratch = makeNumber(static_cast<HeapClosure *>(e)->params.size());
 1273|      0|                break;
 1274|       |
 1275|      7|            default:
  ------------------
  |  Branch (1275:13): [True: 7, False: 398k]
  ------------------
 1276|      7|                throw makeError(loc,
 1277|      7|                                "length operates on strings, objects, "
 1278|      7|                                "and arrays, got " +
 1279|      7|                                    type_str(args[0]));
 1280|   398k|        }
 1281|   398k|        return nullptr;
 1282|   398k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter21builtinObjectFieldsExERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1285|   100k|    {
 1286|   100k|        validateBuiltinArgs(loc, "objectFieldsEx", args, {Value::OBJECT, Value::BOOLEAN});
 1287|   100k|        const auto *obj = static_cast<HeapObject *>(args[0].v.h);
 1288|   100k|        bool include_hidden = args[1].v.b;
 1289|       |        // Stash in a set first to sort them.
 1290|   100k|        std::set<UString> fields;
 1291|   655k|        for (const auto &field : objectFields(obj, !include_hidden)) {
  ------------------
  |  Branch (1291:32): [True: 655k, False: 100k]
  ------------------
 1292|   655k|            fields.insert(field->name);
 1293|   655k|        }
 1294|   100k|        scratch = makeArray({});
 1295|   100k|        auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 1296|   655k|        for (const auto &field : fields) {
  ------------------
  |  Branch (1296:32): [True: 655k, False: 100k]
  ------------------
 1297|   655k|            auto *th = makeHeap<HeapThunk>(idArrayElement, nullptr, 0, nullptr);
 1298|   655k|            elements.push_back(th);
 1299|   655k|            th->fill(makeString(field));
 1300|   655k|        }
 1301|   100k|        return nullptr;
 1302|   100k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierEDniDnEEEPT_DpOT0_:
  577|   655k|    {
  578|   655k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   655k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 1.08k, False: 654k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  1.08k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  1.08k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  1.08k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  1.08k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 1.08k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|   174k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 174k, False: 1.08k]
  ------------------
  597|   174k|                heap.markFrom(sourceVal.second);
  598|   174k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  1.08k|            heap.sweep();
  602|  1.08k|        }
  603|   655k|        return r;
  604|   655k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11builtinCharERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1335|  1.98k|    {
 1336|  1.98k|        validateBuiltinArgs(loc, "char", args, {Value::NUMBER});
 1337|  1.98k|        long l = long(args[0].v.d);
 1338|  1.98k|        if (l < 0) {
  ------------------
  |  Branch (1338:13): [True: 48, False: 1.93k]
  ------------------
 1339|     48|            std::stringstream ss;
 1340|     48|            ss << "codepoints must be >= 0, got " << l;
 1341|     48|            throw makeError(loc, ss.str());
 1342|     48|        }
 1343|  1.93k|        if (l >= JSONNET_CODEPOINT_MAX) {
  ------------------
  |  |   22|  1.93k|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (1343:13): [True: 37, False: 1.89k]
  ------------------
 1344|     37|            std::stringstream ss;
 1345|     37|            ss << "invalid unicode codepoint, got " << l;
 1346|     37|            throw makeError(loc, ss.str());
 1347|     37|        }
 1348|  1.89k|        char32_t c = l;
 1349|  1.89k|        scratch = makeString(UString(&c, 1));
 1350|  1.89k|        return nullptr;
 1351|  1.93k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10builtinLogERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1354|  3.32k|    {
 1355|  3.32k|        validateBuiltinArgs(loc, "log", args, {Value::NUMBER});
 1356|  3.32k|        scratch = makeNumberCheck(loc, std::log(args[0].v.d));
 1357|  3.32k|        return nullptr;
 1358|  3.32k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinModuloERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1386|  37.2k|    {
 1387|  37.2k|        validateBuiltinArgs(loc, "modulo", args, {Value::NUMBER, Value::NUMBER});
 1388|  37.2k|        double a = args[0].v.d;
 1389|  37.2k|        double b = args[1].v.d;
 1390|  37.2k|        if (b == 0)
  ------------------
  |  Branch (1390:13): [True: 15, False: 37.2k]
  ------------------
 1391|     15|            throw makeError(loc, "division by zero.");
 1392|  37.2k|        scratch = makeNumberCheck(loc, std::fmod(a, b));
 1393|  37.2k|        return nullptr;
 1394|  37.2k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack3popEv:
  301|  76.2M|    {
  302|  76.2M|        if (top().isCall())
  ------------------
  |  Branch (302:13): [True: 30.9M, False: 45.2M]
  ------------------
  303|  30.9M|            calls--;
  304|  76.2M|        stack.pop_back();
  305|  76.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter22builtinPrimitiveEqualsERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1422|  3.08M|    {
 1423|  3.08M|        if (args.size() != 2) {
  ------------------
  |  Branch (1423:13): [True: 0, False: 3.08M]
  ------------------
 1424|      0|            std::stringstream ss;
 1425|      0|            ss << "primitiveEquals takes 2 parameters, got " << args.size();
 1426|      0|            throw makeError(loc, ss.str());
 1427|      0|        }
 1428|  3.08M|        if (args[0].t != args[1].t) {
  ------------------
  |  Branch (1428:13): [True: 0, False: 3.08M]
  ------------------
 1429|      0|            scratch = makeBoolean(false);
 1430|      0|            return nullptr;
 1431|      0|        }
 1432|  3.08M|        bool r;
 1433|  3.08M|        switch (args[0].t) {
 1434|  34.9k|            case Value::BOOLEAN: r = args[0].v.b == args[1].v.b; break;
  ------------------
  |  Branch (1434:13): [True: 34.9k, False: 3.05M]
  ------------------
 1435|       |
 1436|   123k|            case Value::NUMBER: r = args[0].v.d == args[1].v.d; break;
  ------------------
  |  Branch (1436:13): [True: 123k, False: 2.96M]
  ------------------
 1437|       |
 1438|  2.92M|            case Value::STRING:
  ------------------
  |  Branch (1438:13): [True: 2.92M, False: 165k]
  ------------------
 1439|  2.92M|                r = static_cast<HeapString *>(args[0].v.h)->value ==
 1440|  2.92M|                    static_cast<HeapString *>(args[1].v.h)->value;
 1441|  2.92M|                break;
 1442|       |
 1443|  6.78k|            case Value::NULL_TYPE: r = true; break;
  ------------------
  |  Branch (1443:13): [True: 6.78k, False: 3.08M]
  ------------------
 1444|       |
 1445|      1|            case Value::FUNCTION: throw makeError(loc, "cannot test equality of functions"); break;
  ------------------
  |  Branch (1445:13): [True: 1, False: 3.08M]
  ------------------
 1446|       |
 1447|      0|            default:
  ------------------
  |  Branch (1447:13): [True: 0, False: 3.08M]
  ------------------
 1448|      0|                throw makeError(loc,
 1449|      0|                                "primitiveEquals operates on primitive "
 1450|      0|                                "types, got " +
 1451|      0|                                    type_str(args[0]));
 1452|  3.08M|        }
 1453|  3.08M|        scratch = makeBoolean(r);
 1454|  3.08M|        return nullptr;
 1455|  3.08M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter18makeBuiltinFromASTEPKNS0_19BuiltinFunctionBodyE:
  658|  5.55M|    {
  659|  5.55M|        HeapClosure::Params hc_params;
  660|  8.78M|        for (const auto p : body->params) {
  ------------------
  |  Branch (660:27): [True: 8.78M, False: 5.55M]
  ------------------
  661|  8.78M|            hc_params.emplace_back(p, nullptr);
  662|  8.78M|        }
  663|  5.55M|        Value r;
  664|  5.55M|        r.t = Value::FUNCTION;
  665|  5.55M|        r.v.h = makeHeap<HeapClosure>(BindingFrame(), nullptr, 0, hc_params, body, body->name);
  666|  5.55M|        return r;
  667|  5.55M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_11HeapClosureEJNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEEDniRNS5_6vectorINS4_5ParamENSE_ISL_EEEERPKNS0_19BuiltinFunctionBodyERKNS5_12basic_stringIcNS5_11char_traitsIcEENSE_IcEEEEEEEPT_DpOT0_:
  577|  5.55M|    {
  578|  5.55M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  5.55M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 6.11k, False: 5.54M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  6.11k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  6.11k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  6.11k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  6.11k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 6.11k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|   984k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 984k, False: 6.11k]
  ------------------
  597|   984k|                heap.markFrom(sourceVal.second);
  598|   984k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  6.11k|            heap.sweep();
  602|  6.11k|        }
  603|  5.55M|        return r;
  604|  5.55M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinSubstrERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1599|    731|    {
 1600|    731|        validateBuiltinArgs(loc, "substr", args, {Value::STRING, Value::NUMBER, Value::NUMBER});
 1601|    731|        const auto *str = static_cast<const HeapString *>(args[0].v.h);
 1602|    731|        long from = long(args[1].v.d);
 1603|    731|        long len = long(args[2].v.d);
 1604|    731|        if (from < 0) {
  ------------------
  |  Branch (1604:13): [True: 0, False: 731]
  ------------------
 1605|      0|            std::stringstream ss;
 1606|      0|            ss << "substr second parameter should be greater than zero, got " << from;
 1607|      0|            throw makeError(loc, ss.str());
 1608|      0|        }
 1609|    731|        if (len < 0) {
  ------------------
  |  Branch (1609:13): [True: 0, False: 731]
  ------------------
 1610|      0|            std::stringstream ss;
 1611|      0|            ss << "substr third parameter should be greater than zero, got " << len;
 1612|      0|            throw makeError(loc, ss.str());
 1613|      0|        }
 1614|    731|        if (static_cast<unsigned long>(from) > str->value.size()) {
  ------------------
  |  Branch (1614:13): [True: 0, False: 731]
  ------------------
 1615|      0|            scratch = makeString(UString());
 1616|      0|            return nullptr;
 1617|      0|        }
 1618|    731|        if (size_t(len + from) > str->value.size()) {
  ------------------
  |  Branch (1618:13): [True: 0, False: 731]
  ------------------
 1619|      0|          len = str->value.size() - from;
 1620|      0|        }
 1621|    731|        scratch = makeString(str->value.substr(from, len));
 1622|    731|        return nullptr;
 1623|    731|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJDnDniPKNS0_3ASTEEEEPT_DpOT0_:
  577|  2.87k|    {
  578|  2.87k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  2.87k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 2.87k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|      0|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|      0|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|      0|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|      0|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 0]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|      0|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 0, False: 0]
  ------------------
  597|      0|                heap.markFrom(sourceVal.second);
  598|      0|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|      0|            heap.sweep();
  602|      0|        }
  603|  2.87k|        return r;
  604|  2.87k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack7newCallERKNS0_13LocationRangeEPNS1_10HeapEntityEPNS1_10HeapObjectEjRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENSA_4lessISE_EENSA_9allocatorINSA_4pairIKSE_SG_EEEEEE:
  418|  31.4M|    {
  419|  31.4M|        tailCallTrimStack();
  420|  31.4M|        if (calls >= limit) {
  ------------------
  |  Branch (420:13): [True: 574, False: 31.4M]
  ------------------
  421|    574|            throw makeError(loc, "max stack frames exceeded.");
  422|    574|        }
  423|  31.4M|        stack.emplace_back(FRAME_CALL, loc);
  424|  31.4M|        calls++;
  425|  31.4M|        top().context = context;
  426|  31.4M|        top().self = self;
  427|  31.4M|        top().offset = offset;
  428|  31.4M|        top().bindings = up_values;
  429|  31.4M|        top().tailCall = false;
  430|       |
  431|  31.4M|#ifndef NDEBUG
  432|  31.4M|        for (const auto &bind : up_values) {
  ------------------
  |  Branch (432:31): [True: 29.0M, False: 31.4M]
  ------------------
  433|  29.0M|            if (bind.second == nullptr) {
  ------------------
  |  Branch (433:17): [True: 0, False: 29.0M]
  ------------------
  434|      0|                std::cerr << "INTERNAL ERROR: No binding for variable "
  435|      0|                          << encode_utf8(bind.first->name) << std::endl;
  436|      0|                std::abort();
  437|      0|            }
  438|  29.0M|        }
  439|  31.4M|#endif
  440|  31.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack17tailCallTrimStackEv:
  394|  31.4M|    {
  395|  32.1M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (395:40): [True: 32.1M, False: 7.16k]
  ------------------
  396|  32.1M|            switch (stack[i].kind) {
  397|  11.2M|                case FRAME_CALL: {
  ------------------
  |  Branch (397:17): [True: 11.2M, False: 20.8M]
  ------------------
  398|  11.2M|                    if (!stack[i].tailCall || stack[i].thunks.size() > 0) {
  ------------------
  |  Branch (398:25): [True: 8.85M, False: 2.42M]
  |  Branch (398:47): [True: 2.23M, False: 191k]
  ------------------
  399|  11.0M|                        return;
  400|  11.0M|                    }
  401|       |                    // Remove all stack frames including this one.
  402|   838k|                    while (stack.size() > unsigned(i))
  ------------------
  |  Branch (402:28): [True: 647k, False: 191k]
  ------------------
  403|   647k|                        stack.pop_back();
  404|   191k|                    calls--;
  405|   191k|                    return;
  406|  11.2M|                } break;
  407|       |
  408|   674k|                case FRAME_LOCAL: break;
  ------------------
  |  Branch (408:17): [True: 674k, False: 31.4M]
  ------------------
  409|       |
  410|  20.2M|                default: return;
  ------------------
  |  Branch (410:17): [True: 20.2M, False: 11.9M]
  ------------------
  411|  32.1M|            }
  412|  32.1M|        }
  413|  31.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15FrameC2ERKNS1_9FrameKindERKNS0_13LocationRangeE:
  209|  39.0M|        : kind(kind),
  210|  39.0M|          ast(nullptr),
  211|  39.0M|          location(location),
  212|  39.0M|          tailCall(false),
  213|  39.0M|          elementId(0),
  214|  39.0M|          first(false),
  215|  39.0M|          context(NULL),
  216|  39.0M|          self(NULL),
  217|  39.0M|          offset(0)
  218|  39.0M|    {
  219|  39.0M|        val.t = Value::NULL_TYPE;
  220|  39.0M|        val2.t = Value::NULL_TYPE;
  221|  39.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter22prepareSourceValThunksEv:
  887|  2.87k|    void prepareSourceValThunks() {
  888|   463k|        for (const auto &field : stdlibAST->fields) {
  ------------------
  |  Branch (888:32): [True: 463k, False: 2.87k]
  ------------------
  889|   463k|            AST *nameAST = field.name;
  890|   463k|            if (nameAST->type != AST_LITERAL_STRING) {
  ------------------
  |  Branch (890:17): [True: 0, False: 463k]
  ------------------
  891|       |                // Skip any fields without a known name.
  892|      0|                continue;
  893|      0|            }
  894|   463k|            UString name = dynamic_cast<LiteralString *>(nameAST)->value;
  895|       |
  896|   463k|            sourceFuncIds.emplace_back(new Identifier(name));
  897|   463k|            auto *th = makeHeap<HeapThunk>(sourceFuncIds.back().get(), stdObject, 0, field.body);
  898|   463k|            sourceVals[encode_utf8(name)] = th;
  899|   463k|        }
  900|  2.87k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJPNS0_10IdentifierERPNS1_10HeapObjectEiRKPNS0_3ASTEEEEPT_DpOT0_:
  577|   463k|    {
  578|   463k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   463k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 463k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|      0|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|      0|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|      0|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|      0|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 0]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|      0|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 0, False: 0]
  ------------------
  597|      0|                heap.markFrom(sourceVal.second);
  598|      0|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|      0|            heap.sweep();
  602|      0|        }
  603|   463k|        return r;
  604|   463k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15StackD2Ev:
  260|  2.87k|    ~Stack(void) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8evaluateEPKNS0_3ASTEj:
 2096|  5.50M|    {
 2097|  88.8M|    recurse:
 2098|       |
 2099|  88.8M|        switch (ast_->type) {
 2100|  7.12M|            case AST_APPLY: {
  ------------------
  |  Branch (2100:13): [True: 7.12M, False: 81.7M]
  ------------------
 2101|  7.12M|                const auto &ast = *static_cast<const Apply *>(ast_);
 2102|  7.12M|                stack.newFrame(FRAME_APPLY_TARGET, ast_);
 2103|  7.12M|                ast_ = ast.target;
 2104|  7.12M|                goto recurse;
 2105|      0|            } break;
 2106|       |
 2107|   745k|            case AST_ARRAY: {
  ------------------
  |  Branch (2107:13): [True: 745k, False: 88.0M]
  ------------------
 2108|   745k|                const auto &ast = *static_cast<const Array *>(ast_);
 2109|   745k|                HeapObject *self;
 2110|   745k|                unsigned offset;
 2111|   745k|                stack.getSelfBinding(self, offset);
 2112|   745k|                scratch = makeArray({});
 2113|   745k|                auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 2114|  7.74M|                for (const auto &el : ast.elements) {
  ------------------
  |  Branch (2114:37): [True: 7.74M, False: 745k]
  ------------------
 2115|  7.74M|                    auto *el_th = makeHeap<HeapThunk>(idArrayElement, self, offset, el.expr);
 2116|  7.74M|                    el_th->upValues = capture(el.expr->freeVariables);
 2117|  7.74M|                    elements.push_back(el_th);
 2118|  7.74M|                }
 2119|   745k|            } break;
 2120|       |
 2121|  3.42M|            case AST_BINARY: {
  ------------------
  |  Branch (2121:13): [True: 3.42M, False: 85.4M]
  ------------------
 2122|  3.42M|                const auto &ast = *static_cast<const Binary *>(ast_);
 2123|  3.42M|                stack.newFrame(FRAME_BINARY_LEFT, ast_);
 2124|  3.42M|                ast_ = ast.left;
 2125|  3.42M|                goto recurse;
 2126|      0|            } break;
 2127|       |
 2128|  5.55M|            case AST_BUILTIN_FUNCTION: {
  ------------------
  |  Branch (2128:13): [True: 5.55M, False: 83.2M]
  ------------------
 2129|  5.55M|                const auto &ast = *static_cast<const BuiltinFunction *>(ast_);
 2130|  5.55M|                scratch = makeBuiltinFromAST(ast.body);
 2131|  5.55M|            } break;
 2132|       |
 2133|      0|            case AST_BUILTIN_FUNCTION_BODY: {
  ------------------
  |  Branch (2133:13): [True: 0, False: 88.8M]
  ------------------
 2134|       |                // We can reach here if we end up evaluating a HeapThunk that was constructed
 2135|       |                // from a built-in function. Synthesize a FRAME_BUILTIN_FORCE_THUNKS to call it.
 2136|      0|                assert(stack.top().isCall());
  ------------------
  |  Branch (2136:17): [True: 0, False: 0]
  ------------------
 2137|      0|                const auto fbody = static_cast<const BuiltinFunctionBody*>(ast_);
 2138|       |
 2139|      0|                const BindingFrame up_values = stack.top().bindings;
 2140|      0|                std::vector<HeapThunk*> arg_thunks;
 2141|      0|                for (const auto &p : fbody->params) {
  ------------------
  |  Branch (2141:36): [True: 0, False: 0]
  ------------------
 2142|      0|                    const auto it = up_values.find(p);
 2143|      0|                    if (it != up_values.end()) {
  ------------------
  |  Branch (2143:25): [True: 0, False: 0]
  ------------------
 2144|      0|                        arg_thunks.push_back(it->second);
 2145|      0|                    } else {
 2146|      0|                        JSONNET_UNREACHABLE();
  ------------------
  |  |   53|      0|  do {                                                             \
  |  |   54|      0|    std::cerr << __FILE__ << ":" << __LINE__                       \
  |  |   55|      0|              << ": INTERNAL ERROR: reached unreachable code path" \
  |  |   56|      0|              << std::endl;                                        \
  |  |   57|      0|    abort();                                                       \
  |  |   58|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (58:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2147|      0|                    }
 2148|      0|                }
 2149|      0|                const LocationRange &loc = stack.top().location;
 2150|       |
 2151|      0|                stack.newFrame(FRAME_BUILTIN_FORCE_THUNKS, loc);
 2152|      0|                stack.top().bindings = up_values;
 2153|      0|                stack.top().thunks = arg_thunks;
 2154|      0|                stack.top().val = makeBuiltinFromAST(fbody);
 2155|      0|            } break;
 2156|       |
 2157|  5.40M|            case AST_CONDITIONAL: {
  ------------------
  |  Branch (2157:13): [True: 5.40M, False: 83.4M]
  ------------------
 2158|  5.40M|                const auto &ast = *static_cast<const Conditional *>(ast_);
 2159|  5.40M|                stack.newFrame(FRAME_IF, ast_);
 2160|  5.40M|                ast_ = ast.cond;
 2161|  5.40M|                goto recurse;
 2162|      0|            } break;
 2163|       |
 2164|  5.48k|            case AST_ERROR: {
  ------------------
  |  Branch (2164:13): [True: 5.48k, False: 88.8M]
  ------------------
 2165|  5.48k|                const auto &ast = *static_cast<const Error *>(ast_);
 2166|  5.48k|                stack.newFrame(FRAME_ERROR, ast_);
 2167|  5.48k|                ast_ = ast.expr;
 2168|  5.48k|                goto recurse;
 2169|      0|            } break;
 2170|       |
 2171|  1.38M|            case AST_FUNCTION: {
  ------------------
  |  Branch (2171:13): [True: 1.38M, False: 87.4M]
  ------------------
 2172|  1.38M|                const auto &ast = *static_cast<const Function *>(ast_);
 2173|  1.38M|                auto env = capture(ast.freeVariables);
 2174|  1.38M|                HeapObject *self;
 2175|  1.38M|                unsigned offset;
 2176|  1.38M|                stack.getSelfBinding(self, offset);
 2177|  1.38M|                HeapClosure::Params params;
 2178|  1.38M|                params.reserve(ast.params.size());
 2179|  2.63M|                for (const auto &p : ast.params) {
  ------------------
  |  Branch (2179:36): [True: 2.63M, False: 1.38M]
  ------------------
 2180|  2.63M|                    params.emplace_back(p.id, p.expr);
 2181|  2.63M|                }
 2182|  1.38M|                scratch = makeClosure(env, self, offset, params, ast.body);
 2183|  1.38M|            } break;
 2184|       |
 2185|     27|            case AST_IMPORT: {
  ------------------
  |  Branch (2185:13): [True: 27, False: 88.8M]
  ------------------
 2186|     27|                const auto &ast = *static_cast<const Import *>(ast_);
 2187|     27|                HeapThunk *thunk = import(ast.location, ast.file);
 2188|     27|                if (thunk->filled) {
  ------------------
  |  Branch (2188:21): [True: 0, False: 27]
  ------------------
 2189|      0|                    scratch = thunk->content;
 2190|     27|                } else {
 2191|     27|                    stack.newCall(ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2192|     27|                    ast_ = thunk->body;
 2193|     27|                    goto recurse;
 2194|     27|                }
 2195|     27|            } break;
 2196|       |
 2197|     15|            case AST_IMPORTSTR: {
  ------------------
  |  Branch (2197:13): [True: 15, False: 88.8M]
  ------------------
 2198|     15|                const auto &ast = *static_cast<const Importstr *>(ast_);
 2199|     15|                const ImportCacheValue *value = importData(ast.location, ast.file);
 2200|     15|                scratch = makeString(decode_utf8(value->content));
 2201|     15|            } break;
 2202|       |
 2203|      3|            case AST_IMPORTBIN: {
  ------------------
  |  Branch (2203:13): [True: 3, False: 88.8M]
  ------------------
 2204|      3|                const auto &ast = *static_cast<const Importbin *>(ast_);
 2205|      3|                const ImportCacheValue *value = importData(ast.location, ast.file);
 2206|      3|                scratch = makeArray({});
 2207|      3|                auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 2208|      3|                elements.reserve(value->content.size());
 2209|      3|                for (const auto c : value->content) {
  ------------------
  |  Branch (2209:35): [True: 0, False: 3]
  ------------------
 2210|      0|                    auto *th = makeHeap<HeapThunk>(idArrayElement, nullptr, 0, nullptr);
 2211|      0|                    elements.push_back(th);
 2212|      0|                    th->fill(makeNumber(uint8_t(c)));
 2213|      0|                }
 2214|      3|            } break;
 2215|       |
 2216|  1.95M|            case AST_IN_SUPER: {
  ------------------
  |  Branch (2216:13): [True: 1.95M, False: 86.8M]
  ------------------
 2217|  1.95M|                const auto &ast = *static_cast<const InSuper *>(ast_);
 2218|  1.95M|                stack.newFrame(FRAME_IN_SUPER_ELEMENT, ast_);
 2219|  1.95M|                ast_ = ast.element;
 2220|  1.95M|                goto recurse;
 2221|     27|            } break;
 2222|       |
 2223|  7.23M|            case AST_INDEX: {
  ------------------
  |  Branch (2223:13): [True: 7.23M, False: 81.5M]
  ------------------
 2224|  7.23M|                const auto &ast = *static_cast<const Index *>(ast_);
 2225|  7.23M|                stack.newFrame(FRAME_INDEX_TARGET, ast_);
 2226|  7.23M|                ast_ = ast.target;
 2227|  7.23M|                goto recurse;
 2228|     27|            } break;
 2229|       |
 2230|  3.87M|            case AST_LOCAL: {
  ------------------
  |  Branch (2230:13): [True: 3.87M, False: 84.9M]
  ------------------
 2231|  3.87M|                const auto &ast = *static_cast<const Local *>(ast_);
 2232|  3.87M|                stack.newFrame(FRAME_LOCAL, ast_);
 2233|  3.87M|                Frame &f = stack.top();
 2234|       |                // First build all the thunks and bind them.
 2235|  3.87M|                HeapObject *self;
 2236|  3.87M|                unsigned offset;
 2237|  3.87M|                stack.getSelfBinding(self, offset);
 2238|  12.3M|                for (const auto &bind : ast.binds) {
  ------------------
  |  Branch (2238:39): [True: 12.3M, False: 3.87M]
  ------------------
 2239|       |                    // Note that these 2 lines must remain separate to avoid the GC running
 2240|       |                    // when bindings has a nullptr for key bind.first.
 2241|  12.3M|                    auto *th = makeHeap<HeapThunk>(bind.var, self, offset, bind.body);
 2242|  12.3M|                    f.bindings[bind.var] = th;
 2243|  12.3M|                }
 2244|       |                // Now capture the environment (including the new thunks, to make cycles).
 2245|  12.3M|                for (const auto &bind : ast.binds) {
  ------------------
  |  Branch (2245:39): [True: 12.3M, False: 3.87M]
  ------------------
 2246|  12.3M|                    auto *thunk = f.bindings[bind.var];
 2247|  12.3M|                    thunk->upValues = capture(bind.body->freeVariables);
 2248|  12.3M|                }
 2249|  3.87M|                ast_ = ast.body;
 2250|  3.87M|                goto recurse;
 2251|     27|            } break;
 2252|       |
 2253|   303k|            case AST_LITERAL_BOOLEAN: {
  ------------------
  |  Branch (2253:13): [True: 303k, False: 88.5M]
  ------------------
 2254|   303k|                const auto &ast = *static_cast<const LiteralBoolean *>(ast_);
 2255|   303k|                scratch = makeBoolean(ast.value);
 2256|   303k|            } break;
 2257|       |
 2258|  5.35M|            case AST_LITERAL_NUMBER: {
  ------------------
  |  Branch (2258:13): [True: 5.35M, False: 83.4M]
  ------------------
 2259|  5.35M|                const auto &ast = *static_cast<const LiteralNumber *>(ast_);
 2260|  5.35M|                scratch = makeNumberCheck(ast_->location, ast.value);
 2261|  5.35M|            } break;
 2262|       |
 2263|  22.3M|            case AST_LITERAL_STRING: {
  ------------------
  |  Branch (2263:13): [True: 22.3M, False: 66.4M]
  ------------------
 2264|  22.3M|                const auto &ast = *static_cast<const LiteralString *>(ast_);
 2265|  22.3M|                scratch = makeString(ast.value);
 2266|  22.3M|            } break;
 2267|       |
 2268|  21.5k|            case AST_LITERAL_NULL: {
  ------------------
  |  Branch (2268:13): [True: 21.5k, False: 88.8M]
  ------------------
 2269|  21.5k|                scratch = makeNull();
 2270|  21.5k|            } break;
 2271|       |
 2272|  1.54M|            case AST_DESUGARED_OBJECT: {
  ------------------
  |  Branch (2272:13): [True: 1.54M, False: 87.2M]
  ------------------
 2273|  1.54M|                const auto &ast = *static_cast<const DesugaredObject *>(ast_);
 2274|  1.54M|                if (ast.fields.empty()) {
  ------------------
  |  Branch (2274:21): [True: 749k, False: 795k]
  ------------------
 2275|   749k|                    auto env = capture(ast.freeVariables);
 2276|   749k|                    std::map<const Identifier *, HeapSimpleObject::Field> fields;
 2277|   749k|                    scratch = makeObject<HeapSimpleObject>(env, fields, ast.asserts);
 2278|   795k|                } else {
 2279|   795k|                    auto env = capture(ast.freeVariables);
 2280|   795k|                    stack.newFrame(FRAME_OBJECT, ast_);
 2281|   795k|                    auto fit = ast.fields.begin();
 2282|   795k|                    stack.top().fit = fit;
 2283|   795k|                    ast_ = fit->name;
 2284|   795k|                    goto recurse;
 2285|   795k|                }
 2286|  1.54M|            } break;
 2287|       |
 2288|   749k|            case AST_OBJECT_COMPREHENSION_SIMPLE: {
  ------------------
  |  Branch (2288:13): [True: 36, False: 88.8M]
  ------------------
 2289|     36|                const auto &ast = *static_cast<const ObjectComprehensionSimple *>(ast_);
 2290|     36|                stack.newFrame(FRAME_OBJECT_COMP_ARRAY, ast_);
 2291|     36|                ast_ = ast.array;
 2292|     36|                goto recurse;
 2293|  1.54M|            } break;
 2294|       |
 2295|  1.33M|            case AST_SELF: {
  ------------------
  |  Branch (2295:13): [True: 1.33M, False: 87.5M]
  ------------------
 2296|  1.33M|                scratch.t = Value::OBJECT;
 2297|  1.33M|                HeapObject *self;
 2298|  1.33M|                unsigned offset;
 2299|  1.33M|                stack.getSelfBinding(self, offset);
 2300|  1.33M|                scratch.v.h = self;
 2301|  1.33M|            } break;
 2302|       |
 2303|  1.70M|            case AST_SUPER_INDEX: {
  ------------------
  |  Branch (2303:13): [True: 1.70M, False: 87.1M]
  ------------------
 2304|  1.70M|                const auto &ast = *static_cast<const SuperIndex *>(ast_);
 2305|  1.70M|                stack.newFrame(FRAME_SUPER_INDEX, ast_);
 2306|  1.70M|                ast_ = ast.index;
 2307|  1.70M|                goto recurse;
 2308|  1.54M|            } break;
 2309|       |
 2310|  1.81M|            case AST_UNARY: {
  ------------------
  |  Branch (2310:13): [True: 1.81M, False: 87.0M]
  ------------------
 2311|  1.81M|                const auto &ast = *static_cast<const Unary *>(ast_);
 2312|  1.81M|                stack.newFrame(FRAME_UNARY, ast_);
 2313|  1.81M|                ast_ = ast.expr;
 2314|  1.81M|                goto recurse;
 2315|  1.54M|            } break;
 2316|       |
 2317|  17.6M|            case AST_VAR: {
  ------------------
  |  Branch (2317:13): [True: 17.6M, False: 71.1M]
  ------------------
 2318|  17.6M|                const auto &ast = *static_cast<const Var *>(ast_);
 2319|  17.6M|                auto *thunk = stack.lookUpVar(ast.id);
 2320|  17.6M|                if (thunk == nullptr) {
  ------------------
  |  Branch (2320:21): [True: 0, False: 17.6M]
  ------------------
 2321|      0|                    std::cerr << "INTERNAL ERROR: Could not bind variable: "
 2322|      0|                              << encode_utf8(ast.id->name) << " at "
 2323|      0|                              << ast.location << std::endl;
 2324|      0|                    std::abort();
 2325|      0|                }
 2326|  17.6M|                if (thunk->filled) {
  ------------------
  |  Branch (2326:21): [True: 13.0M, False: 4.62M]
  ------------------
 2327|  13.0M|                    scratch = thunk->content;
 2328|  13.0M|                } else {
 2329|  4.62M|                    stack.newCall(ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2330|  4.62M|                    ast_ = thunk->body;
 2331|  4.62M|                    goto recurse;
 2332|  4.62M|                }
 2333|  17.6M|            } break;
 2334|       |
 2335|  13.0M|            default:
  ------------------
  |  Branch (2335:13): [True: 0, False: 88.8M]
  ------------------
 2336|      0|                std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_->type << std::endl;
 2337|      0|                std::abort();
 2338|  88.8M|        }
 2339|       |
 2340|       |        // To evaluate another AST, set ast to it, then goto recurse.
 2341|       |        // To pop, exit the switch or goto popframe
 2342|       |        // To change the frame and re-enter the switch, goto replaceframe
 2343|   100M|        while (stack.size() > initial_stack_size) {
  ------------------
  |  Branch (2343:16): [True: 94.9M, False: 5.48M]
  ------------------
 2344|  94.9M|            Frame &f = stack.top();
 2345|  94.9M|            switch (f.kind) {
 2346|  7.12M|                case FRAME_APPLY_TARGET: {
  ------------------
  |  Branch (2346:17): [True: 7.12M, False: 87.8M]
  ------------------
 2347|  7.12M|                    const auto &ast = *static_cast<const Apply *>(f.ast);
 2348|  7.12M|                    if (scratch.t != Value::FUNCTION) {
  ------------------
  |  Branch (2348:25): [True: 17, False: 7.12M]
  ------------------
 2349|     17|                        throw makeError(ast.location,
 2350|     17|                                        "only functions can be called, got " + type_str(scratch));
 2351|     17|                    }
 2352|  7.12M|                    auto *func = static_cast<HeapClosure *>(scratch.v.h);
 2353|       |
 2354|  7.12M|                    std::set<const Identifier *> params_needed;
 2355|  12.0M|                    for (const auto &param : func->params) {
  ------------------
  |  Branch (2355:44): [True: 12.0M, False: 7.12M]
  ------------------
 2356|  12.0M|                        params_needed.insert(param.id);
 2357|  12.0M|                    }
 2358|       |
 2359|       |                    // Create thunks for arguments.
 2360|  7.12M|                    std::vector<HeapThunk *> positional_args;
 2361|  7.12M|                    BindingFrame args;
 2362|  7.12M|                    bool got_named = false;
 2363|  19.1M|                    for (std::size_t i = 0; i < ast.args.size(); ++i) {
  ------------------
  |  Branch (2363:45): [True: 12.0M, False: 7.12M]
  ------------------
 2364|  12.0M|                        const auto &arg = ast.args[i];
 2365|       |
 2366|  12.0M|                        const Identifier *name;
 2367|  12.0M|                        if (arg.id != nullptr) {
  ------------------
  |  Branch (2367:29): [True: 0, False: 12.0M]
  ------------------
 2368|      0|                            got_named = true;
 2369|      0|                            name = arg.id;
 2370|  12.0M|                        } else {
 2371|  12.0M|                            if (got_named) {
  ------------------
  |  Branch (2371:33): [True: 0, False: 12.0M]
  ------------------
 2372|      0|                                std::stringstream ss;
 2373|      0|                                ss << "internal error: got positional param after named at index "
 2374|      0|                                   << i;
 2375|      0|                                throw makeError(ast.location, ss.str());
 2376|      0|                            }
 2377|  12.0M|                            if (i >= func->params.size()) {
  ------------------
  |  Branch (2377:33): [True: 0, False: 12.0M]
  ------------------
 2378|      0|                                std::stringstream ss;
 2379|      0|                                ss << "too many args, function has " << func->params.size()
 2380|      0|                                   << " parameter(s)";
 2381|      0|                                throw makeError(ast.location, ss.str());
 2382|      0|                            }
 2383|  12.0M|                            name = func->params[i].id;
 2384|  12.0M|                        }
 2385|       |                        // Special case for builtin functions -- leave identifier blank for
 2386|       |                        // them in the thunk.  This removes the thunk frame from the stacktrace.
 2387|  12.0M|                        const Identifier *name_ = func->isBuiltin() ? nullptr : name;
  ------------------
  |  Branch (2387:51): [True: 8.78M, False: 3.28M]
  ------------------
 2388|  12.0M|                        HeapObject *self;
 2389|  12.0M|                        unsigned offset;
 2390|  12.0M|                        stack.getSelfBinding(self, offset);
 2391|  12.0M|                        auto *thunk = makeHeap<HeapThunk>(name_, self, offset, arg.expr);
 2392|  12.0M|                        thunk->upValues = capture(arg.expr->freeVariables);
 2393|       |                        // While making the thunks, keep them in a frame to avoid premature garbage
 2394|       |                        // collection.
 2395|  12.0M|                        f.thunks.push_back(thunk);
 2396|  12.0M|                        if (args.find(name) != args.end()) {
  ------------------
  |  Branch (2396:29): [True: 0, False: 12.0M]
  ------------------
 2397|      0|                            std::stringstream ss;
 2398|      0|                            ss << "binding parameter a second time: " << encode_utf8(name->name);
 2399|      0|                            throw makeError(ast.location, ss.str());
 2400|      0|                        }
 2401|  12.0M|                        args[name] = thunk;
 2402|  12.0M|                        if (params_needed.find(name) == params_needed.end()) {
  ------------------
  |  Branch (2402:29): [True: 0, False: 12.0M]
  ------------------
 2403|      0|                            std::stringstream ss;
 2404|      0|                            ss << "function has no parameter " << encode_utf8(name->name);
 2405|      0|                            throw makeError(ast.location, ss.str());
 2406|      0|                        }
 2407|  12.0M|                    }
 2408|       |
 2409|       |                    // For any func params for which there was no arg, create a thunk for those and
 2410|       |                    // bind the default argument.  Allow default thunks to see other params.  If no
 2411|       |                    // default argument than raise an error.
 2412|       |
 2413|       |                    // Raise errors for unbound params, create thunks (but don't fill in upvalues).
 2414|       |                    // This is a subset of f.thunks, so will not get garbage collected.
 2415|  7.12M|                    std::vector<HeapThunk *> def_arg_thunks;
 2416|  12.0M|                    for (const auto &param : func->params) {
  ------------------
  |  Branch (2416:44): [True: 12.0M, False: 7.12M]
  ------------------
 2417|  12.0M|                        if (args.find(param.id) != args.end())
  ------------------
  |  Branch (2417:29): [True: 12.0M, False: 120]
  ------------------
 2418|  12.0M|                            continue;
 2419|    120|                        if (param.def == nullptr) {
  ------------------
  |  Branch (2419:29): [True: 8, False: 112]
  ------------------
 2420|      8|                            std::stringstream ss;
 2421|      8|                            ss << "function parameter " << encode_utf8(param.id->name)
 2422|      8|                               << " not bound in call.";
 2423|      8|                            throw makeError(ast.location, ss.str());
 2424|      8|                        }
 2425|       |
 2426|       |                        // Special case for builtin functions -- leave identifier blank for
 2427|       |                        // them in the thunk.  This removes the thunk frame from the stacktrace.
 2428|    112|                        const Identifier *name_ = func->isBuiltin() ? nullptr : param.id;
  ------------------
  |  Branch (2428:51): [True: 0, False: 112]
  ------------------
 2429|    112|                        auto *thunk =
 2430|    112|                            makeHeap<HeapThunk>(name_, func->self, func->offset, param.def);
 2431|    112|                        f.thunks.push_back(thunk);
 2432|    112|                        def_arg_thunks.push_back(thunk);
 2433|    112|                        args[param.id] = thunk;
 2434|    112|                    }
 2435|       |
 2436|  7.12M|                    BindingFrame up_values = func->upValues;
 2437|  7.12M|                    up_values.insert(args.begin(), args.end());
 2438|       |
 2439|       |                    // Fill in upvalues
 2440|  7.12M|                    for (HeapThunk *thunk : def_arg_thunks) {
  ------------------
  |  Branch (2440:43): [True: 88, False: 7.12M]
  ------------------
 2441|     88|                        thunk->upValues = up_values;
 2442|     88|                    }
 2443|       |
 2444|       |                    // Cache these, because pop will invalidate them.
 2445|  7.12M|                    std::vector<HeapThunk *> thunks_copy = f.thunks;
 2446|       |
 2447|  7.12M|                    const AST *f_ast = f.ast;
 2448|  7.12M|                    stack.pop();
 2449|       |
 2450|  7.12M|                    if (func->isBuiltin()) {
  ------------------
  |  Branch (2450:25): [True: 5.55M, False: 1.57M]
  ------------------
 2451|       |                        // Built-in function.
 2452|       |                        // Give nullptr for self because no one looking at this frame will
 2453|       |                        // attempt to bind to self (it's native code).
 2454|  5.55M|                        stack.newFrame(FRAME_BUILTIN_FORCE_THUNKS, f_ast);
 2455|  5.55M|                        assert(func->upValues.empty());
  ------------------
  |  Branch (2455:25): [True: 5.55M, False: 0]
  ------------------
 2456|  5.55M|                        stack.top().bindings = up_values;
 2457|  5.55M|                        stack.top().thunks = thunks_copy;
 2458|  5.55M|                        stack.top().val = scratch;
 2459|  5.55M|                        goto replaceframe;
 2460|  5.55M|                    } else {
 2461|       |                        // User defined function.
 2462|  1.57M|                        stack.newCall(ast.location, func, func->self, func->offset, up_values);
 2463|  1.57M|                        if (ast.tailstrict) {
  ------------------
  |  Branch (2463:29): [True: 990k, False: 581k]
  ------------------
 2464|   990k|                            stack.top().tailCall = true;
 2465|   990k|                            if (thunks_copy.size() == 0) {
  ------------------
  |  Branch (2465:33): [True: 0, False: 990k]
  ------------------
 2466|       |                                // No need to force thunks, proceed straight to body.
 2467|      0|                                ast_ = func->body;
 2468|      0|                                goto recurse;
 2469|   990k|                            } else {
 2470|       |                                // The check for args.size() > 0
 2471|   990k|                                stack.top().thunks = thunks_copy;
 2472|   990k|                                stack.top().val = scratch;
 2473|   990k|                                goto replaceframe;
 2474|   990k|                            }
 2475|   990k|                        } else {
 2476|   581k|                            ast_ = func->body;
 2477|   581k|                            goto recurse;
 2478|   581k|                        }
 2479|  1.57M|                    }
 2480|  7.12M|                } break;
 2481|       |
 2482|  3.34M|                case FRAME_BINARY_LEFT: {
  ------------------
  |  Branch (2482:17): [True: 3.34M, False: 91.6M]
  ------------------
 2483|  3.34M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 2484|  3.34M|                    const Value &lhs = scratch;
 2485|  3.34M|                    if (lhs.t == Value::BOOLEAN) {
  ------------------
  |  Branch (2485:25): [True: 117k, False: 3.22M]
  ------------------
 2486|       |                        // Handle short-cut semantics
 2487|   117k|                        switch (ast.op) {
 2488|  51.0k|                            case BOP_AND: {
  ------------------
  |  Branch (2488:29): [True: 51.0k, False: 66.9k]
  ------------------
 2489|  51.0k|                                if (!lhs.v.b) {
  ------------------
  |  Branch (2489:37): [True: 8.21k, False: 42.8k]
  ------------------
 2490|  8.21k|                                    scratch = makeBoolean(false);
 2491|  8.21k|                                    goto popframe;
 2492|  8.21k|                                }
 2493|  51.0k|                            } break;
 2494|       |
 2495|  64.6k|                            case BOP_OR: {
  ------------------
  |  Branch (2495:29): [True: 64.6k, False: 53.3k]
  ------------------
 2496|  64.6k|                                if (lhs.v.b) {
  ------------------
  |  Branch (2496:37): [True: 3.60k, False: 61.0k]
  ------------------
 2497|  3.60k|                                    scratch = makeBoolean(true);
 2498|  3.60k|                                    goto popframe;
 2499|  3.60k|                                }
 2500|  64.6k|                            } break;
 2501|       |
 2502|  61.0k|                            default:;
  ------------------
  |  Branch (2502:29): [True: 2.29k, False: 115k]
  ------------------
 2503|   117k|                        }
 2504|   117k|                    }
 2505|  3.33M|                    stack.top().kind = FRAME_BINARY_RIGHT;
 2506|  3.33M|                    stack.top().val = lhs;
 2507|  3.33M|                    ast_ = ast.right;
 2508|  3.33M|                    goto recurse;
 2509|  3.34M|                } break;
 2510|       |
 2511|  3.32M|                case FRAME_BINARY_RIGHT: {
  ------------------
  |  Branch (2511:17): [True: 3.32M, False: 91.6M]
  ------------------
 2512|  3.32M|                    stack.top().val2 = scratch;
 2513|  3.32M|                    stack.top().kind = FRAME_BINARY_OP;
 2514|  3.32M|                }
 2515|  3.32M|                [[fallthrough]];
 2516|  3.32M|                case FRAME_BINARY_OP: {
  ------------------
  |  Branch (2516:17): [True: 191, False: 94.9M]
  ------------------
 2517|  3.32M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 2518|  3.32M|                    const Value &lhs = stack.top().val;
 2519|  3.32M|                    const Value &rhs = stack.top().val2;
 2520|       |
 2521|       |                    // Handle cases where the LHS and RHS are not the same type.
 2522|  3.32M|                    if (lhs.t == Value::STRING || rhs.t == Value::STRING) {
  ------------------
  |  Branch (2522:25): [True: 1.00M, False: 2.32M]
  |  Branch (2522:51): [True: 10.5k, False: 2.31M]
  ------------------
 2523|  1.01M|                        if (ast.op == BOP_PLUS) {
  ------------------
  |  Branch (2523:29): [True: 966k, False: 48.5k]
  ------------------
 2524|       |                            // Handle co-ercions for string processing.
 2525|   966k|                            stack.top().kind = FRAME_STRING_CONCAT;
 2526|   966k|                            stack.top().val2 = rhs;
 2527|   966k|                            goto replaceframe;
 2528|   966k|                        }
 2529|  1.01M|                    }
 2530|  2.35M|                    switch (ast.op) {
 2531|       |                        // Equality can be used when the types don't match.
 2532|      0|                        case BOP_MANIFEST_EQUAL:
  ------------------
  |  Branch (2532:25): [True: 0, False: 2.35M]
  ------------------
 2533|      0|                            std::cerr << "INTERNAL ERROR: Equals not desugared" << std::endl;
 2534|      0|                            abort();
 2535|       |
 2536|       |                        // Equality can be used when the types don't match.
 2537|      0|                        case BOP_MANIFEST_UNEQUAL:
  ------------------
  |  Branch (2537:25): [True: 0, False: 2.35M]
  ------------------
 2538|      0|                            std::cerr << "INTERNAL ERROR: Notequals not desugared" << std::endl;
 2539|      0|                            abort();
 2540|       |
 2541|       |                        // e in e
 2542|    417|                        case BOP_IN: {
  ------------------
  |  Branch (2542:25): [True: 417, False: 2.35M]
  ------------------
 2543|    417|                            if (lhs.t != Value::STRING) {
  ------------------
  |  Branch (2543:33): [True: 3, False: 414]
  ------------------
 2544|      3|                                throw makeError(ast.location,
 2545|      3|                                                "the left hand side of the 'in' operator should be "
 2546|      3|                                                "a string,  got " +
 2547|      3|                                                    type_str(lhs));
 2548|      3|                            }
 2549|    414|                            auto *field = static_cast<HeapString *>(lhs.v.h);
 2550|    414|                            switch (rhs.t) {
 2551|    412|                                case Value::OBJECT: {
  ------------------
  |  Branch (2551:33): [True: 412, False: 2]
  ------------------
 2552|    412|                                    auto *obj = static_cast<HeapObject *>(rhs.v.h);
 2553|    412|                                    auto *fid = alloc->makeIdentifier(field->value);
 2554|    412|                                    unsigned unused_found_at = 0;
 2555|    412|                                    bool in = findObject(fid, obj, 0, unused_found_at);
 2556|    412|                                    scratch = makeBoolean(in);
 2557|    412|                                } break;
 2558|       |
 2559|      2|                                default:
  ------------------
  |  Branch (2559:33): [True: 2, False: 412]
  ------------------
 2560|      2|                                    throw makeError(
 2561|      2|                                        ast.location,
 2562|      2|                                        "the right hand side of the 'in' operator should be"
 2563|      2|                                        " an object, got " +
 2564|      2|                                            type_str(rhs));
 2565|    414|                            }
 2566|    412|                            goto popframe;
 2567|    414|                        }
 2568|       |
 2569|  2.35M|                        default:;
  ------------------
  |  Branch (2569:25): [True: 2.35M, False: 417]
  ------------------
 2570|  2.35M|                    }
 2571|       |                    // Everything else requires matching types.
 2572|  2.35M|                    if (lhs.t != rhs.t) {
  ------------------
  |  Branch (2572:25): [True: 93, False: 2.35M]
  ------------------
 2573|     93|                        throw makeError(ast.location,
 2574|     93|                                        "binary operator " + bop_string(ast.op) +
 2575|     93|                                            " requires "
 2576|     93|                                            "matching types, got " +
 2577|     93|                                            type_str(lhs) + " and " + type_str(rhs) + ".");
 2578|     93|                    }
 2579|  2.35M|                    switch (lhs.t) {
  ------------------
  |  Branch (2579:29): [True: 2.35M, False: 0]
  ------------------
 2580|   537k|                        case Value::ARRAY:
  ------------------
  |  Branch (2580:25): [True: 537k, False: 1.82M]
  ------------------
 2581|   537k|                            if (ast.op == BOP_PLUS) {
  ------------------
  |  Branch (2581:33): [True: 521k, False: 16.2k]
  ------------------
 2582|   521k|                                auto *arr_l = static_cast<HeapArray *>(lhs.v.h);
 2583|   521k|                                auto *arr_r = static_cast<HeapArray *>(rhs.v.h);
 2584|   521k|                                std::vector<HeapThunk *> elements;
 2585|   521k|                                for (auto *el : arr_l->elements)
  ------------------
  |  Branch (2585:47): [True: 66.4M, False: 521k]
  ------------------
 2586|  66.4M|                                    elements.push_back(el);
 2587|   521k|                                for (auto *el : arr_r->elements)
  ------------------
  |  Branch (2587:47): [True: 2.13M, False: 521k]
  ------------------
 2588|  2.13M|                                    elements.push_back(el);
 2589|   521k|                                scratch = makeArray(elements);
 2590|   521k|                            } else if (ast.op == BOP_LESS || ast.op == BOP_LESS_EQ || ast.op == BOP_GREATER || ast.op == BOP_GREATER_EQ) {
  ------------------
  |  Branch (2590:40): [True: 3.68k, False: 12.5k]
  |  Branch (2590:62): [True: 8.57k, False: 3.98k]
  |  Branch (2590:87): [True: 1.84k, False: 2.13k]
  |  Branch (2590:112): [True: 2.13k, False: 6]
  ------------------
 2591|  16.2k|                                HeapThunk *func;
 2592|  16.2k|                                switch(ast.op) {
 2593|  3.68k|                                case BOP_LESS:
  ------------------
  |  Branch (2593:33): [True: 3.68k, False: 12.5k]
  ------------------
 2594|  3.68k|                                    func = sourceVals["__array_less"];
 2595|  3.68k|                                    break;
 2596|  8.57k|                                case BOP_LESS_EQ:
  ------------------
  |  Branch (2596:33): [True: 8.57k, False: 7.66k]
  ------------------
 2597|  8.57k|                                    func = sourceVals["__array_less_or_equal"];
 2598|  8.57k|                                    break;
 2599|  1.84k|                                case BOP_GREATER:
  ------------------
  |  Branch (2599:33): [True: 1.84k, False: 14.3k]
  ------------------
 2600|  1.84k|                                    func = sourceVals["__array_greater"];
 2601|  1.84k|                                    break;
 2602|  2.13k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2602:33): [True: 2.13k, False: 14.1k]
  ------------------
 2603|  2.13k|                                    func = sourceVals["__array_greater_or_equal"];
 2604|  2.13k|                                    break;
 2605|      0|                                default:
  ------------------
  |  Branch (2605:33): [True: 0, False: 16.2k]
  ------------------
 2606|      0|                                    JSONNET_UNREACHABLE();
  ------------------
  |  |   53|      0|  do {                                                             \
  |  |   54|      0|    std::cerr << __FILE__ << ":" << __LINE__                       \
  |  |   55|      0|              << ": INTERNAL ERROR: reached unreachable code path" \
  |  |   56|      0|              << std::endl;                                        \
  |  |   57|      0|    abort();                                                       \
  |  |   58|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (58:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2607|  16.2k|                                }
 2608|  16.2k|                                if (!func->filled) {
  ------------------
  |  Branch (2608:37): [True: 191, False: 16.0k]
  ------------------
 2609|    191|                                    stack.newCall(ast.location, func, func->self, func->offset, func->upValues);
 2610|    191|                                    ast_ = func->body;
 2611|    191|                                    goto recurse;
 2612|    191|                                }
 2613|  16.0k|                                auto *lhs_th = makeHeap<HeapThunk>(idInternal, f.self, f.offset, ast.left);
 2614|  16.0k|                                lhs_th->fill(lhs);
 2615|  16.0k|                                f.thunks.push_back(lhs_th);
 2616|  16.0k|                                auto *rhs_th = makeHeap<HeapThunk>(idInternal, f.self, f.offset, ast.right);
 2617|  16.0k|                                rhs_th->fill(rhs);
 2618|  16.0k|                                f.thunks.push_back(rhs_th);
 2619|  16.0k|                                const AST *orig_ast = ast_;
 2620|  16.0k|                                stack.pop();
 2621|  16.0k|                                ast_ = callSourceVal(orig_ast, func, {lhs_th, rhs_th});
 2622|  16.0k|                                goto recurse;
 2623|  16.2k|                            } else {
 2624|      6|                                throw makeError(ast.location,
 2625|      6|                                                "binary operator " + bop_string(ast.op) +
 2626|      6|                                                    " does not operate on arrays.");
 2627|      6|                            }
 2628|   521k|                            break;
 2629|       |
 2630|   521k|                        case Value::BOOLEAN:
  ------------------
  |  Branch (2630:25): [True: 103k, False: 2.25M]
  ------------------
 2631|   103k|                            switch (ast.op) {
 2632|  42.7k|                                case BOP_AND: scratch = makeBoolean(lhs.v.b && rhs.v.b); break;
  ------------------
  |  Branch (2632:33): [True: 42.7k, False: 61.0k]
  |  Branch (2632:69): [True: 42.7k, False: 0]
  |  Branch (2632:80): [True: 37.6k, False: 5.14k]
  ------------------
 2633|       |
 2634|  61.0k|                                case BOP_OR: scratch = makeBoolean(lhs.v.b || rhs.v.b); break;
  ------------------
  |  Branch (2634:33): [True: 61.0k, False: 42.8k]
  |  Branch (2634:68): [True: 0, False: 61.0k]
  |  Branch (2634:79): [True: 3.34k, False: 57.6k]
  ------------------
 2635|       |
 2636|     26|                                default:
  ------------------
  |  Branch (2636:33): [True: 26, False: 103k]
  ------------------
 2637|     26|                                    throw makeError(ast.location,
 2638|     26|                                                    "binary operator " + bop_string(ast.op) +
 2639|     26|                                                        " does not operate on booleans.");
 2640|   103k|                            }
 2641|   103k|                            break;
 2642|       |
 2643|   698k|                        case Value::NUMBER:
  ------------------
  |  Branch (2643:25): [True: 698k, False: 1.66M]
  ------------------
 2644|   698k|                            switch (ast.op) {
 2645|   166k|                                case BOP_PLUS:
  ------------------
  |  Branch (2645:33): [True: 166k, False: 532k]
  ------------------
 2646|   166k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d + rhs.v.d);
 2647|   166k|                                    break;
 2648|       |
 2649|  37.8k|                                case BOP_MINUS:
  ------------------
  |  Branch (2649:33): [True: 37.8k, False: 660k]
  ------------------
 2650|  37.8k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d - rhs.v.d);
 2651|  37.8k|                                    break;
 2652|       |
 2653|  5.98k|                                case BOP_MULT:
  ------------------
  |  Branch (2653:33): [True: 5.98k, False: 692k]
  ------------------
 2654|  5.98k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d * rhs.v.d);
 2655|  5.98k|                                    break;
 2656|       |
 2657|  63.7k|                                case BOP_DIV:
  ------------------
  |  Branch (2657:33): [True: 63.7k, False: 635k]
  ------------------
 2658|  63.7k|                                    if (rhs.v.d == 0)
  ------------------
  |  Branch (2658:41): [True: 1, False: 63.7k]
  ------------------
 2659|      1|                                        throw makeError(ast.location, "division by zero.");
 2660|  63.7k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d / rhs.v.d);
 2661|  63.7k|                                    break;
 2662|       |
 2663|       |                                    // No need to check doubles made from longs
 2664|       |
 2665|    461|                                case BOP_SHIFT_L: {
  ------------------
  |  Branch (2665:33): [True: 461, False: 698k]
  ------------------
 2666|    461|                                    if (rhs.v.d < 0)
  ------------------
  |  Branch (2666:41): [True: 1, False: 460]
  ------------------
 2667|      1|                                        throw makeError(ast.location, "shift by negative exponent.");
 2668|       |
 2669|    460|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2670|    460|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2671|    460|                                    long_r = long_r % 64;
 2672|       |
 2673|       |                                    // Additional safety check for left shifts to prevent undefined behavior.
 2674|       |                                    // Left-shift that would move the highest set bit into the sign bit position is undefined.
 2675|    460|                                    if (long_r >= 1 && abs(long_l) >= (1LL << (63 - long_r))) {
  ------------------
  |  Branch (2675:41): [True: 278, False: 182]
  |  Branch (2675:56): [True: 33, False: 245]
  ------------------
 2676|     33|                                        throw makeError(ast.location,
 2677|     33|                                            "numeric value outside safe integer range for bitwise operation.");
 2678|     33|                                    }
 2679|       |
 2680|       |                                    // Left-shift of a negative number is undefined until C++20.
 2681|       |                                    // Perform the shift on unsigned int to avoid that.
 2682|    427|                                    scratch = makeNumber(static_cast<int64_t>(static_cast<uint64_t>(long_l) << long_r));
 2683|    427|                                } break;
 2684|       |
 2685|     27|                                case BOP_SHIFT_R: {
  ------------------
  |  Branch (2685:33): [True: 27, False: 698k]
  ------------------
 2686|     27|                                    if (rhs.v.d < 0)
  ------------------
  |  Branch (2686:41): [True: 1, False: 26]
  ------------------
 2687|      1|                                        throw makeError(ast.location, "shift by negative exponent.");
 2688|       |
 2689|     26|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2690|     26|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2691|     26|                                    long_r = long_r % 64;
 2692|     26|                                    scratch = makeNumber(long_l >> long_r);
 2693|     26|                                } break;
 2694|       |
 2695|  26.7k|                                case BOP_BITWISE_AND: {
  ------------------
  |  Branch (2695:33): [True: 26.7k, False: 672k]
  ------------------
 2696|  26.7k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2697|  26.7k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2698|  26.7k|                                    scratch = makeNumber(long_l & long_r);
 2699|  26.7k|                                } break;
 2700|       |
 2701|  12.4k|                                case BOP_BITWISE_XOR: {
  ------------------
  |  Branch (2701:33): [True: 12.4k, False: 686k]
  ------------------
 2702|  12.4k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2703|  12.4k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2704|  12.4k|                                    scratch = makeNumber(long_l ^ long_r);
 2705|  12.4k|                                } break;
 2706|       |
 2707|  7.83k|                                case BOP_BITWISE_OR: {
  ------------------
  |  Branch (2707:33): [True: 7.83k, False: 691k]
  ------------------
 2708|  7.83k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2709|  7.83k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2710|  7.83k|                                    scratch = makeNumber(long_l | long_r);
 2711|  7.83k|                                } break;
 2712|       |
 2713|  26.5k|                                case BOP_LESS_EQ: scratch = makeBoolean(lhs.v.d <= rhs.v.d); break;
  ------------------
  |  Branch (2713:33): [True: 26.5k, False: 672k]
  ------------------
 2714|       |
 2715|   228k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2715:33): [True: 228k, False: 470k]
  ------------------
 2716|   228k|                                    scratch = makeBoolean(lhs.v.d >= rhs.v.d);
 2717|   228k|                                    break;
 2718|       |
 2719|   105k|                                case BOP_LESS: scratch = makeBoolean(lhs.v.d < rhs.v.d); break;
  ------------------
  |  Branch (2719:33): [True: 105k, False: 593k]
  ------------------
 2720|       |
 2721|  16.2k|                                case BOP_GREATER: scratch = makeBoolean(lhs.v.d > rhs.v.d); break;
  ------------------
  |  Branch (2721:33): [True: 16.2k, False: 682k]
  ------------------
 2722|       |
 2723|      2|                                default:
  ------------------
  |  Branch (2723:33): [True: 2, False: 698k]
  ------------------
 2724|      2|                                    throw makeError(ast.location,
 2725|      2|                                                    "binary operator " + bop_string(ast.op) +
 2726|      2|                                                        " does not operate on numbers.");
 2727|   698k|                            }
 2728|   698k|                            break;
 2729|       |
 2730|   698k|                        case Value::FUNCTION:
  ------------------
  |  Branch (2730:25): [True: 2, False: 2.35M]
  ------------------
 2731|      2|                            throw makeError(ast.location,
 2732|      2|                                            "binary operator " + bop_string(ast.op) +
 2733|      2|                                                " does not operate on functions.");
 2734|       |
 2735|      1|                        case Value::NULL_TYPE:
  ------------------
  |  Branch (2735:25): [True: 1, False: 2.35M]
  ------------------
 2736|      1|                            throw makeError(ast.location,
 2737|      1|                                            "binary operator " + bop_string(ast.op) +
 2738|      1|                                                " does not operate on null.");
 2739|       |
 2740|   970k|                        case Value::OBJECT: {
  ------------------
  |  Branch (2740:25): [True: 970k, False: 1.38M]
  ------------------
 2741|   970k|                            if (ast.op != BOP_PLUS) {
  ------------------
  |  Branch (2741:33): [True: 6, False: 970k]
  ------------------
 2742|      6|                                throw makeError(ast.location,
 2743|      6|                                                "binary operator " + bop_string(ast.op) +
 2744|      6|                                                    " does not operate on objects.");
 2745|      6|                            }
 2746|   970k|                            auto *lhs_obj = static_cast<HeapObject *>(lhs.v.h);
 2747|   970k|                            auto *rhs_obj = static_cast<HeapObject *>(rhs.v.h);
 2748|   970k|                            scratch = makeObject<HeapExtendedObject>(lhs_obj, rhs_obj);
 2749|   970k|                        } break;
 2750|       |
 2751|  48.1k|                        case Value::STRING: {
  ------------------
  |  Branch (2751:25): [True: 48.1k, False: 2.31M]
  ------------------
 2752|  48.1k|                            const UString &lhs_str = static_cast<HeapString *>(lhs.v.h)->value;
 2753|  48.1k|                            const UString &rhs_str = static_cast<HeapString *>(rhs.v.h)->value;
 2754|  48.1k|                            switch (ast.op) {
 2755|      0|                                case BOP_PLUS: scratch = makeString(lhs_str + rhs_str); break;
  ------------------
  |  Branch (2755:33): [True: 0, False: 48.1k]
  ------------------
 2756|       |
 2757|  10.0k|                                case BOP_LESS_EQ: scratch = makeBoolean(lhs_str <= rhs_str); break;
  ------------------
  |  Branch (2757:33): [True: 10.0k, False: 38.1k]
  ------------------
 2758|       |
 2759|  29.4k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2759:33): [True: 29.4k, False: 18.7k]
  ------------------
 2760|  29.4k|                                    scratch = makeBoolean(lhs_str >= rhs_str);
 2761|  29.4k|                                    break;
 2762|       |
 2763|  4.57k|                                case BOP_LESS: scratch = makeBoolean(lhs_str < rhs_str); break;
  ------------------
  |  Branch (2763:33): [True: 4.57k, False: 43.5k]
  ------------------
 2764|       |
 2765|  4.09k|                                case BOP_GREATER: scratch = makeBoolean(lhs_str > rhs_str); break;
  ------------------
  |  Branch (2765:33): [True: 4.09k, False: 44.0k]
  ------------------
 2766|       |
 2767|     25|                                default:
  ------------------
  |  Branch (2767:33): [True: 25, False: 48.1k]
  ------------------
 2768|     25|                                    throw makeError(ast.location,
 2769|     25|                                                    "binary operator " + bop_string(ast.op) +
 2770|     25|                                                        " does not operate on strings.");
 2771|  48.1k|                            }
 2772|  48.1k|                        } break;
 2773|  2.35M|                    }
 2774|  2.35M|                } break;
 2775|       |
 2776|  2.34M|                case FRAME_BUILTIN_FILTER: {
  ------------------
  |  Branch (2776:17): [True: 0, False: 94.9M]
  ------------------
 2777|      0|                    const auto &ast = *static_cast<const Apply *>(f.ast);
 2778|      0|                    auto *func = static_cast<HeapClosure *>(f.val.v.h);
 2779|      0|                    auto *arr = static_cast<HeapArray *>(f.val2.v.h);
 2780|      0|                    if (scratch.t != Value::BOOLEAN) {
  ------------------
  |  Branch (2780:25): [True: 0, False: 0]
  ------------------
 2781|      0|                        throw makeError(
 2782|      0|                            ast.location,
 2783|      0|                            "filter function must return boolean, got: " + type_str(scratch));
 2784|      0|                    }
 2785|      0|                    if (scratch.v.b)
  ------------------
  |  Branch (2785:25): [True: 0, False: 0]
  ------------------
 2786|      0|                        f.thunks.push_back(arr->elements[f.elementId]);
 2787|      0|                    f.elementId++;
 2788|       |                    // Iterate through arr, calling the function on each.
 2789|      0|                    if (f.elementId == arr->elements.size()) {
  ------------------
  |  Branch (2789:25): [True: 0, False: 0]
  ------------------
 2790|      0|                        scratch = makeArray(f.thunks);
 2791|      0|                    } else {
 2792|      0|                        auto *thunk = arr->elements[f.elementId];
 2793|      0|                        BindingFrame bindings = func->upValues;
 2794|      0|                        bindings[func->params[0].id] = thunk;
 2795|      0|                        stack.newCall(ast.location, func, func->self, func->offset, bindings);
 2796|      0|                        ast_ = func->body;
 2797|      0|                        goto recurse;
 2798|      0|                    }
 2799|      0|                } break;
 2800|       |
 2801|  14.3M|                case FRAME_BUILTIN_FORCE_THUNKS: {
  ------------------
  |  Branch (2801:17): [True: 14.3M, False: 80.6M]
  ------------------
 2802|  14.3M|                    const auto &location = f.location;
 2803|  14.3M|                    auto *func = static_cast<HeapClosure *>(f.val.v.h);
 2804|  14.3M|                    if (f.elementId == f.thunks.size()) {
  ------------------
  |  Branch (2804:25): [True: 5.54M, False: 8.77M]
  ------------------
 2805|       |                        // All thunks forced, now the builtin implementations.
 2806|  5.54M|                        const std::string &builtin_name = func->builtinName;
 2807|  5.54M|                        std::vector<Value> args;
 2808|  8.77M|                        for (const auto &p : func->params) {
  ------------------
  |  Branch (2808:44): [True: 8.77M, False: 5.54M]
  ------------------
 2809|  8.77M|                            const auto it = f.bindings.find(p.id);
 2810|  8.77M|                            if (it != f.bindings.end()) {
  ------------------
  |  Branch (2810:33): [True: 8.77M, False: 0]
  ------------------
 2811|  8.77M|                                assert(it->second->filled);
  ------------------
  |  Branch (2811:33): [True: 8.77M, False: 0]
  ------------------
 2812|  8.77M|                                args.push_back(it->second->content);
 2813|  8.77M|                            } else {
 2814|      0|                                std::stringstream ss;
 2815|      0|                                ss << "function parameter " << encode_utf8(p.id->name)
 2816|      0|                                    << " not bound in call.";
 2817|      0|                                throw makeError(location, ss.str());
 2818|      0|                            }
 2819|  8.77M|                        }
 2820|       |
 2821|  5.54M|                        BuiltinMap::const_iterator bit = builtins.find(builtin_name);
 2822|  5.54M|                        if (bit != builtins.end()) {
  ------------------
  |  Branch (2822:29): [True: 5.54M, False: 0]
  ------------------
 2823|  5.54M|                            const AST *new_ast = (this->*bit->second)(location, args);
 2824|  5.54M|                            if (new_ast != nullptr) {
  ------------------
  |  Branch (2824:33): [True: 0, False: 5.54M]
  ------------------
 2825|      0|                                ast_ = new_ast;
 2826|      0|                                goto recurse;
 2827|      0|                            }
 2828|  5.54M|                            break;
 2829|  5.54M|                        }
 2830|      0|                        VmNativeCallbackMap::const_iterator nit =
 2831|      0|                            nativeCallbacks.find(builtin_name);
 2832|       |                        // TODO(dcunnin): Support arrays.
 2833|       |                        // TODO(dcunnin): Support objects.
 2834|      0|                        std::vector<JsonnetJsonValue> args2;
 2835|      0|                        for (const Value &arg : args) {
  ------------------
  |  Branch (2835:47): [True: 0, False: 0]
  ------------------
 2836|      0|                            switch (arg.t) {
 2837|      0|                                case Value::STRING:
  ------------------
  |  Branch (2837:33): [True: 0, False: 0]
  ------------------
 2838|      0|                                    args2.emplace_back(
 2839|      0|                                        JsonnetJsonValue::STRING,
 2840|      0|                                        encode_utf8(static_cast<HeapString *>(arg.v.h)->value),
 2841|      0|                                        0);
 2842|      0|                                    break;
 2843|       |
 2844|      0|                                case Value::BOOLEAN:
  ------------------
  |  Branch (2844:33): [True: 0, False: 0]
  ------------------
 2845|      0|                                    args2.emplace_back(
 2846|      0|                                        JsonnetJsonValue::BOOL, "", arg.v.b ? 1.0 : 0.0);
  ------------------
  |  Branch (2846:69): [True: 0, False: 0]
  ------------------
 2847|      0|                                    break;
 2848|       |
 2849|      0|                                case Value::NUMBER:
  ------------------
  |  Branch (2849:33): [True: 0, False: 0]
  ------------------
 2850|      0|                                    args2.emplace_back(JsonnetJsonValue::NUMBER, "", arg.v.d);
 2851|      0|                                    break;
 2852|       |
 2853|      0|                                case Value::NULL_TYPE:
  ------------------
  |  Branch (2853:33): [True: 0, False: 0]
  ------------------
 2854|      0|                                    args2.emplace_back(JsonnetJsonValue::NULL_KIND, "", 0);
 2855|      0|                                    break;
 2856|       |
 2857|      0|                                default:
  ------------------
  |  Branch (2857:33): [True: 0, False: 0]
  ------------------
 2858|      0|                                    throw makeError(location,
 2859|      0|                                                    "native extensions can only take primitives.");
 2860|      0|                            }
 2861|      0|                        }
 2862|      0|                        std::vector<const JsonnetJsonValue *> args3;
 2863|      0|                        for (size_t i = 0; i < args2.size(); ++i) {
  ------------------
  |  Branch (2863:44): [True: 0, False: 0]
  ------------------
 2864|      0|                            args3.push_back(&args2[i]);
 2865|      0|                        }
 2866|      0|                        if (nit == nativeCallbacks.end()) {
  ------------------
  |  Branch (2866:29): [True: 0, False: 0]
  ------------------
 2867|      0|                            throw makeError(location,
 2868|      0|                                            "unrecognized builtin name: " + builtin_name);
 2869|      0|                        }
 2870|      0|                        const VmNativeCallback &cb = nit->second;
 2871|       |
 2872|      0|                        int succ;
 2873|      0|                        std::unique_ptr<JsonnetJsonValue> r(cb.cb(cb.ctx, args3.data(), &succ));
 2874|       |
 2875|      0|                        if (succ) {
  ------------------
  |  Branch (2875:29): [True: 0, False: 0]
  ------------------
 2876|      0|                            bool unused;
 2877|      0|                            jsonToHeap(r, unused, scratch);
 2878|      0|                        } else {
 2879|      0|                            if (r->kind != JsonnetJsonValue::STRING) {
  ------------------
  |  Branch (2879:33): [True: 0, False: 0]
  ------------------
 2880|      0|                                throw makeError(
 2881|      0|                                    location,
 2882|      0|                                    "native extension returned an error that was not a string.");
 2883|      0|                            }
 2884|      0|                            std::string rs = r->string;
 2885|      0|                            throw makeError(location, rs);
 2886|      0|                        }
 2887|       |
 2888|  8.77M|                    } else {
 2889|       |                        // Not all arguments forced yet.
 2890|  8.77M|                        HeapThunk *th = f.thunks[f.elementId++];
 2891|  8.77M|                        if (!th->filled) {
  ------------------
  |  Branch (2891:29): [True: 8.77M, False: 0]
  ------------------
 2892|  8.77M|                            stack.newCall(location, th, th->self, th->offset, th->upValues);
 2893|  8.77M|                            ast_ = th->body;
 2894|  8.77M|                            goto recurse;
 2895|  8.77M|                        } else {
 2896|       |                            // Otherwise loop back around to force the next thunk.
 2897|      0|                            goto replaceframe;
 2898|      0|                        }
 2899|  8.77M|                    }
 2900|  14.3M|                } break;
 2901|       |
 2902|  28.8M|                case FRAME_CALL: {
  ------------------
  |  Branch (2902:17): [True: 28.8M, False: 66.1M]
  ------------------
 2903|  28.8M|                    if (auto *thunk = dynamic_cast<HeapThunk *>(f.context)) {
  ------------------
  |  Branch (2903:31): [True: 15.6M, False: 13.2M]
  ------------------
 2904|       |                        // If we called a thunk, cache result.
 2905|  15.6M|                        thunk->fill(scratch);
 2906|  15.6M|                    } else if (auto *closure = dynamic_cast<HeapClosure *>(f.context)) {
  ------------------
  |  Branch (2906:38): [True: 4.56M, False: 8.63M]
  ------------------
 2907|  4.56M|                        if (f.elementId < f.thunks.size()) {
  ------------------
  |  Branch (2907:29): [True: 2.23M, False: 2.33M]
  ------------------
 2908|       |                            // If tailstrict, force thunks
 2909|  2.23M|                            HeapThunk *th = f.thunks[f.elementId++];
 2910|  2.23M|                            if (!th->filled) {
  ------------------
  |  Branch (2910:33): [True: 2.23M, False: 0]
  ------------------
 2911|  2.23M|                                stack.newCall(f.location, th, th->self, th->offset, th->upValues);
 2912|  2.23M|                                ast_ = th->body;
 2913|  2.23M|                                goto recurse;
 2914|  2.23M|                            }
 2915|  2.33M|                        } else if (f.thunks.size() == 0) {
  ------------------
  |  Branch (2915:36): [True: 1.35M, False: 978k]
  ------------------
 2916|       |                            // Body has now been executed
 2917|  1.35M|                        } else {
 2918|       |                            // Execute the body
 2919|   978k|                            f.thunks.clear();
 2920|   978k|                            f.elementId = 0;
 2921|   978k|                            ast_ = closure->body;
 2922|   978k|                            goto recurse;
 2923|   978k|                        }
 2924|  4.56M|                    }
 2925|       |                    // Result of call is in scratch, just pop.
 2926|  28.8M|                } break;
 2927|       |
 2928|  25.6M|                case FRAME_ERROR: {
  ------------------
  |  Branch (2928:17): [True: 3.51k, False: 94.9M]
  ------------------
 2929|  3.51k|                    const auto &ast = *static_cast<const Error *>(f.ast);
 2930|  3.51k|                    UString msg;
 2931|  3.51k|                    if (scratch.t == Value::STRING) {
  ------------------
  |  Branch (2931:25): [True: 275, False: 3.24k]
  ------------------
 2932|    275|                        msg = static_cast<HeapString *>(scratch.v.h)->value;
 2933|  3.24k|                    } else {
 2934|  3.24k|                        msg = toString(ast.location);
 2935|  3.24k|                    }
 2936|  3.51k|                    throw makeError(ast.location, encode_utf8(msg));
 2937|  28.8M|                } break;
 2938|       |
 2939|  5.39M|                case FRAME_IF: {
  ------------------
  |  Branch (2939:17): [True: 5.39M, False: 89.6M]
  ------------------
 2940|  5.39M|                    const auto &ast = *static_cast<const Conditional *>(f.ast);
 2941|  5.39M|                    if (scratch.t != Value::BOOLEAN) {
  ------------------
  |  Branch (2941:25): [True: 56, False: 5.38M]
  ------------------
 2942|     56|                        throw makeError(
 2943|     56|                            ast.location,
 2944|     56|                            "condition must be boolean, got " + type_str(scratch) + ".");
 2945|     56|                    }
 2946|  5.38M|                    ast_ = scratch.v.b ? ast.branchTrue : ast.branchFalse;
  ------------------
  |  Branch (2946:28): [True: 2.20M, False: 3.18M]
  ------------------
 2947|  5.38M|                    stack.pop();
 2948|  5.38M|                    goto recurse;
 2949|  5.39M|                } break;
 2950|       |
 2951|  1.70M|                case FRAME_SUPER_INDEX: {
  ------------------
  |  Branch (2951:17): [True: 1.70M, False: 93.2M]
  ------------------
 2952|  1.70M|                    const auto &ast = *static_cast<const SuperIndex *>(f.ast);
 2953|  1.70M|                    HeapObject *self;
 2954|  1.70M|                    unsigned offset;
 2955|  1.70M|                    stack.getSelfBinding(self, offset);
 2956|  1.70M|                    offset++;
 2957|  1.70M|                    if (offset >= countLeaves(self)) {
  ------------------
  |  Branch (2957:25): [True: 1, False: 1.70M]
  ------------------
 2958|      1|                        throw makeError(ast.location,
 2959|      1|                                        "attempt to use super when there is no super class.");
 2960|      1|                    }
 2961|  1.70M|                    if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2961:25): [True: 0, False: 1.70M]
  ------------------
 2962|      0|                        throw makeError(
 2963|      0|                            ast.location,
 2964|      0|                            "super index must be string, got " + type_str(scratch) + ".");
 2965|      0|                    }
 2966|       |
 2967|  1.70M|                    const UString &index_name = static_cast<HeapString *>(scratch.v.h)->value;
 2968|  1.70M|                    auto *fid = alloc->makeIdentifier(index_name);
 2969|  1.70M|                    stack.pop();
 2970|  1.70M|                    ast_ = objectIndex(ast.location, self, fid, offset);
 2971|  1.70M|                    goto recurse;
 2972|  1.70M|                } break;
 2973|       |
 2974|  1.95M|                case FRAME_IN_SUPER_ELEMENT: {
  ------------------
  |  Branch (2974:17): [True: 1.95M, False: 93.0M]
  ------------------
 2975|  1.95M|                    const auto &ast = *static_cast<const InSuper *>(f.ast);
 2976|  1.95M|                    HeapObject *self;
 2977|  1.95M|                    unsigned offset;
 2978|  1.95M|                    stack.getSelfBinding(self, offset);
 2979|  1.95M|                    offset++;
 2980|  1.95M|                    if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2980:25): [True: 1, False: 1.95M]
  ------------------
 2981|      1|                        throw makeError(ast.location,
 2982|      1|                                        "left hand side of e in super must be string, got " +
 2983|      1|                                            type_str(scratch) + ".");
 2984|      1|                    }
 2985|  1.95M|                    if (offset >= countLeaves(self)) {
  ------------------
  |  Branch (2985:25): [True: 211k, False: 1.74M]
  ------------------
 2986|       |                        // There is no super object.
 2987|   211k|                        scratch = makeBoolean(false);
 2988|  1.74M|                    } else {
 2989|  1.74M|                        const UString &element_name = static_cast<HeapString *>(scratch.v.h)->value;
 2990|  1.74M|                        auto *fid = alloc->makeIdentifier(element_name);
 2991|  1.74M|                        unsigned unused_found_at = 0;
 2992|  1.74M|                        bool in = findObject(fid, self, offset, unused_found_at);
 2993|  1.74M|                        scratch = makeBoolean(in);
 2994|  1.74M|                    }
 2995|  1.95M|                } break;
 2996|       |
 2997|  7.23M|                case FRAME_INDEX_INDEX: {
  ------------------
  |  Branch (2997:17): [True: 7.23M, False: 87.7M]
  ------------------
 2998|  7.23M|                    const auto &ast = *static_cast<const Index *>(f.ast);
 2999|  7.23M|                    const Value &target = f.val;
 3000|  7.23M|                    if (target.t == Value::ARRAY) {
  ------------------
  |  Branch (3000:25): [True: 114k, False: 7.11M]
  ------------------
 3001|   114k|                        const auto *array = static_cast<HeapArray *>(target.v.h);
 3002|   114k|                        if (scratch.t == Value::STRING) {
  ------------------
  |  Branch (3002:29): [True: 62, False: 114k]
  ------------------
 3003|     62|                            const UString &str = static_cast<HeapString *>(scratch.v.h)->value;
 3004|     62|                            throw makeError(
 3005|     62|                                ast.location,
 3006|     62|                                "attempted index an array with string \""
 3007|     62|                                + encode_utf8(jsonnet_string_escape(str, false)) + "\".");
 3008|     62|                        }
 3009|   114k|                        if (scratch.t != Value::NUMBER) {
  ------------------
  |  Branch (3009:29): [True: 8, False: 114k]
  ------------------
 3010|      8|                            throw makeError(
 3011|      8|                                ast.location,
 3012|      8|                                "array index must be number, got " + type_str(scratch) + ".");
 3013|      8|                        }
 3014|   114k|                        double index = ::floor(scratch.v.d);
 3015|   114k|                        long sz = array->elements.size();
 3016|   114k|                        if (index < 0 || index >= sz) {
  ------------------
  |  Branch (3016:29): [True: 1, False: 114k]
  |  Branch (3016:42): [True: 9, False: 114k]
  ------------------
 3017|     10|                            std::stringstream ss;
 3018|     10|                            ss << "array bounds error: " << index << " not within [0, " << sz
 3019|     10|                               << ")";
 3020|     10|                            throw makeError(ast.location, ss.str());
 3021|     10|                        }
 3022|   114k|                        if (scratch.v.d != index) {
  ------------------
  |  Branch (3022:29): [True: 1, False: 114k]
  ------------------
 3023|      1|                            std::stringstream ss;
 3024|      1|                            ss << "array index was not integer: " << scratch.v.d;
 3025|      1|                            throw makeError(ast.location, ss.str());
 3026|      1|                        }
 3027|       |                        // index < sz <= SIZE_T_MAX
 3028|   114k|                        auto *thunk = array->elements[size_t(index)];
 3029|   114k|                        if (thunk->filled) {
  ------------------
  |  Branch (3029:29): [True: 44.5k, False: 70.0k]
  ------------------
 3030|  44.5k|                            scratch = thunk->content;
 3031|  70.0k|                        } else {
 3032|  70.0k|                            stack.pop();
 3033|  70.0k|                            stack.newCall(
 3034|  70.0k|                                ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 3035|  70.0k|                            ast_ = thunk->body;
 3036|  70.0k|                            goto recurse;
 3037|  70.0k|                        }
 3038|  7.11M|                    } else if (target.t == Value::OBJECT) {
  ------------------
  |  Branch (3038:32): [True: 6.97M, False: 142k]
  ------------------
 3039|  6.97M|                        auto *obj = static_cast<HeapObject *>(target.v.h);
 3040|  6.97M|                        assert(obj != nullptr);
  ------------------
  |  Branch (3040:25): [True: 6.97M, False: 0]
  ------------------
 3041|  6.97M|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (3041:29): [True: 7, False: 6.97M]
  ------------------
 3042|      7|                            throw makeError(
 3043|      7|                                ast.location,
 3044|      7|                                "object index must be string, got " + type_str(scratch) + ".");
 3045|      7|                        }
 3046|  6.97M|                        const UString &index_name = static_cast<HeapString *>(scratch.v.h)->value;
 3047|  6.97M|                        auto *fid = alloc->makeIdentifier(index_name);
 3048|  6.97M|                        stack.pop();
 3049|  6.97M|                        ast_ = objectIndex(ast.location, obj, fid, 0);
 3050|  6.97M|                        goto recurse;
 3051|  6.97M|                    } else if (target.t == Value::STRING) {
  ------------------
  |  Branch (3051:32): [True: 142k, False: 0]
  ------------------
 3052|   142k|                        auto *obj = static_cast<HeapString *>(target.v.h);
 3053|   142k|                        assert(obj != nullptr);
  ------------------
  |  Branch (3053:25): [True: 142k, False: 0]
  ------------------
 3054|   142k|                        if (scratch.t != Value::NUMBER) {
  ------------------
  |  Branch (3054:29): [True: 5, False: 142k]
  ------------------
 3055|      5|                            throw makeError(
 3056|      5|                                ast.location,
 3057|      5|                                "string index must be a number, got " + type_str(scratch) + ".");
 3058|      5|                        }
 3059|   142k|                        long sz = obj->value.length();
 3060|   142k|                        long i = (long)scratch.v.d;
 3061|   142k|                        if (i < 0 || i >= sz) {
  ------------------
  |  Branch (3061:29): [True: 46, False: 142k]
  |  Branch (3061:38): [True: 42, False: 142k]
  ------------------
 3062|     88|                            std::stringstream ss;
 3063|     88|                            ss << "string bounds error: " << i << " not within [0, " << sz << ")";
 3064|     88|                            throw makeError(ast.location, ss.str());
 3065|     88|                        }
 3066|   142k|                        char32_t ch[] = {obj->value[i], U'\0'};
 3067|   142k|                        scratch = makeString(ch);
 3068|   142k|                    } else {
 3069|      0|                        std::cerr << "INTERNAL ERROR: not object / array / string." << std::endl;
 3070|      0|                        abort();
 3071|      0|                    }
 3072|  7.23M|                } break;
 3073|       |
 3074|  7.23M|                case FRAME_INDEX_TARGET: {
  ------------------
  |  Branch (3074:17): [True: 7.23M, False: 87.7M]
  ------------------
 3075|  7.23M|                    const auto &ast = *static_cast<const Index *>(f.ast);
 3076|  7.23M|                    if (scratch.t != Value::ARRAY && scratch.t != Value::OBJECT &&
  ------------------
  |  Branch (3076:25): [True: 7.12M, False: 114k]
  |  Branch (3076:54): [True: 142k, False: 6.97M]
  ------------------
 3077|   142k|                        scratch.t != Value::STRING) {
  ------------------
  |  Branch (3077:25): [True: 10, False: 142k]
  ------------------
 3078|     10|                        throw makeError(ast.location,
 3079|     10|                                        "can only index objects, strings, and arrays, got " +
 3080|     10|                                            type_str(scratch) + ".");
 3081|     10|                    }
 3082|  7.23M|                    f.val = scratch;
 3083|  7.23M|                    f.kind = FRAME_INDEX_INDEX;
 3084|  7.23M|                    if (scratch.t == Value::OBJECT) {
  ------------------
  |  Branch (3084:25): [True: 6.97M, False: 257k]
  ------------------
 3085|  6.97M|                        auto *self = static_cast<HeapObject *>(scratch.v.h);
 3086|  6.97M|                        if (!stack.alreadyExecutingInvariants(self)) {
  ------------------
  |  Branch (3086:29): [True: 6.97M, False: 8.31k]
  ------------------
 3087|  6.97M|                            stack.newFrame(FRAME_INVARIANTS, ast.location);
 3088|  6.97M|                            Frame &f2 = stack.top();
 3089|  6.97M|                            f2.self = self;
 3090|  6.97M|                            unsigned counter = 0;
 3091|  6.97M|                            objectInvariants(self, self, counter, f2.thunks);
 3092|  6.97M|                            if (f2.thunks.size() > 0) {
  ------------------
  |  Branch (3092:33): [True: 1.15k, False: 6.96M]
  ------------------
 3093|  1.15k|                                auto *thunk = f2.thunks[0];
 3094|  1.15k|                                f2.elementId = 1;
 3095|  1.15k|                                stack.newCall(ast.location,
 3096|  1.15k|                                              thunk,
 3097|  1.15k|                                              thunk->self,
 3098|  1.15k|                                              thunk->offset,
 3099|  1.15k|                                              thunk->upValues);
 3100|  1.15k|                                ast_ = thunk->body;
 3101|  1.15k|                                goto recurse;
 3102|  1.15k|                            }
 3103|  6.97M|                        }
 3104|  6.97M|                    }
 3105|  7.23M|                    ast_ = ast.index;
 3106|  7.23M|                    goto recurse;
 3107|  7.23M|                } break;
 3108|       |
 3109|  6.98M|                case FRAME_INVARIANTS: {
  ------------------
  |  Branch (3109:17): [True: 6.98M, False: 88.0M]
  ------------------
 3110|  6.98M|                    if (f.elementId >= f.thunks.size()) {
  ------------------
  |  Branch (3110:25): [True: 6.97M, False: 10.4k]
  ------------------
 3111|  6.97M|                        if (stack.size() == initial_stack_size + 1) {
  ------------------
  |  Branch (3111:29): [True: 6.23k, False: 6.96M]
  ------------------
 3112|       |                            // Just pop, evaluate was invoked by runInvariants.
 3113|  6.23k|                            break;
 3114|  6.23k|                        }
 3115|  6.96M|                        stack.pop();
 3116|  6.96M|                        Frame &f2 = stack.top();
 3117|  6.96M|                        const auto &ast = *static_cast<const Index *>(f2.ast);
 3118|  6.96M|                        ast_ = ast.index;
 3119|  6.96M|                        goto recurse;
 3120|  6.97M|                    }
 3121|  10.4k|                    auto *thunk = f.thunks[f.elementId++];
 3122|  10.4k|                    stack.newCall(f.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 3123|  10.4k|                    ast_ = thunk->body;
 3124|  10.4k|                    goto recurse;
 3125|  6.98M|                } break;
 3126|       |
 3127|  3.37M|                case FRAME_LOCAL: {
  ------------------
  |  Branch (3127:17): [True: 3.37M, False: 91.6M]
  ------------------
 3128|       |                    // Result of execution is in scratch already.
 3129|  3.37M|                } break;
 3130|       |
 3131|  1.88M|                case FRAME_OBJECT: {
  ------------------
  |  Branch (3131:17): [True: 1.88M, False: 93.1M]
  ------------------
 3132|  1.88M|                    const auto &ast = *static_cast<const DesugaredObject *>(f.ast);
 3133|  1.88M|                    if (scratch.t != Value::NULL_TYPE) {
  ------------------
  |  Branch (3133:25): [True: 1.88M, False: 0]
  ------------------
 3134|  1.88M|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (3134:29): [True: 19, False: 1.88M]
  ------------------
 3135|     19|                            throw makeError(ast.location, "field name was not a string.");
 3136|     19|                        }
 3137|  1.88M|                        const auto &fname = static_cast<const HeapString *>(scratch.v.h)->value;
 3138|  1.88M|                        const Identifier *fid = alloc->makeIdentifier(fname);
 3139|  1.88M|                        if (f.objectFields.find(fid) != f.objectFields.end()) {
  ------------------
  |  Branch (3139:29): [True: 1, False: 1.88M]
  ------------------
 3140|      1|                            std::string msg =
 3141|      1|                                "duplicate field name: \"" + encode_utf8(fname) + "\"";
 3142|      1|                            throw makeError(ast.location, msg);
 3143|      1|                        }
 3144|  1.88M|                        f.objectFields[fid].hide = f.fit->hide;
 3145|  1.88M|                        f.objectFields[fid].body = f.fit->body;
 3146|  1.88M|                    }
 3147|  1.88M|                    f.fit++;
 3148|  1.88M|                    if (f.fit != ast.fields.end()) {
  ------------------
  |  Branch (3148:25): [True: 1.09M, False: 795k]
  ------------------
 3149|  1.09M|                        ast_ = f.fit->name;
 3150|  1.09M|                        goto recurse;
 3151|  1.09M|                    } else {
 3152|   795k|                        auto env = capture(ast.freeVariables);
 3153|   795k|                        scratch = makeObject<HeapSimpleObject>(env, f.objectFields, ast.asserts);
 3154|   795k|                    }
 3155|  1.88M|                } break;
 3156|       |
 3157|   795k|                case FRAME_OBJECT_COMP_ARRAY: {
  ------------------
  |  Branch (3157:17): [True: 0, False: 94.9M]
  ------------------
 3158|      0|                    const auto &ast = *static_cast<const ObjectComprehensionSimple *>(f.ast);
 3159|      0|                    const Value &arr_v = scratch;
 3160|      0|                    if (scratch.t != Value::ARRAY) {
  ------------------
  |  Branch (3160:25): [True: 0, False: 0]
  ------------------
 3161|      0|                        throw makeError(ast.location,
 3162|      0|                                        "object comprehension needs array, got " + type_str(arr_v));
 3163|      0|                    }
 3164|      0|                    const auto *arr = static_cast<const HeapArray *>(arr_v.v.h);
 3165|      0|                    if (arr->elements.size() == 0) {
  ------------------
  |  Branch (3165:25): [True: 0, False: 0]
  ------------------
 3166|       |                        // Degenerate case.  Just create the object now.
 3167|      0|                        scratch = makeObject<HeapComprehensionObject>(
 3168|      0|                            BindingFrame{}, ast.value, ast.id, BindingFrame{});
 3169|      0|                    } else {
 3170|      0|                        f.kind = FRAME_OBJECT_COMP_ELEMENT;
 3171|      0|                        f.val = scratch;
 3172|      0|                        f.bindings[ast.id] = arr->elements[0];
 3173|      0|                        f.elementId = 0;
 3174|      0|                        ast_ = ast.field;
 3175|      0|                        goto recurse;
 3176|      0|                    }
 3177|      0|                } break;
 3178|       |
 3179|      0|                case FRAME_OBJECT_COMP_ELEMENT: {
  ------------------
  |  Branch (3179:17): [True: 0, False: 94.9M]
  ------------------
 3180|      0|                    const auto &ast = *static_cast<const ObjectComprehensionSimple *>(f.ast);
 3181|      0|                    const auto *arr = static_cast<const HeapArray *>(f.val.v.h);
 3182|      0|                    if (scratch.t != Value::NULL_TYPE) {
  ------------------
  |  Branch (3182:25): [True: 0, False: 0]
  ------------------
 3183|      0|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (3183:29): [True: 0, False: 0]
  ------------------
 3184|      0|                            std::stringstream ss;
 3185|      0|                            ss << "field must be string, got: " << type_str(scratch);
 3186|      0|                            throw makeError(ast.location, ss.str());
 3187|      0|                        }
 3188|      0|                        const auto &fname = static_cast<const HeapString *>(scratch.v.h)->value;
 3189|      0|                        const Identifier *fid = alloc->makeIdentifier(fname);
 3190|      0|                        if (f.elements.find(fid) != f.elements.end()) {
  ------------------
  |  Branch (3190:29): [True: 0, False: 0]
  ------------------
 3191|      0|                            throw makeError(ast.location,
 3192|      0|                                            "duplicate field name: \"" + encode_utf8(fname) + "\"");
 3193|      0|                        }
 3194|      0|                        f.elements[fid] = arr->elements[f.elementId];
 3195|      0|                    }
 3196|      0|                    f.elementId++;
 3197|       |
 3198|      0|                    if (f.elementId == arr->elements.size()) {
  ------------------
  |  Branch (3198:25): [True: 0, False: 0]
  ------------------
 3199|      0|                        auto env = capture(ast.freeVariables);
 3200|      0|                        scratch =
 3201|      0|                            makeObject<HeapComprehensionObject>(env, ast.value, ast.id, f.elements);
 3202|      0|                    } else {
 3203|      0|                        f.bindings[ast.id] = arr->elements[f.elementId];
 3204|      0|                        ast_ = ast.field;
 3205|      0|                        goto recurse;
 3206|      0|                    }
 3207|      0|                } break;
 3208|       |
 3209|   966k|                case FRAME_STRING_CONCAT: {
  ------------------
  |  Branch (3209:17): [True: 966k, False: 94.0M]
  ------------------
 3210|   966k|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 3211|   966k|                    const Value &lhs = stack.top().val;
 3212|   966k|                    UString output;
 3213|   966k|                    if (lhs.t == Value::STRING) {
  ------------------
  |  Branch (3213:25): [True: 955k, False: 10.4k]
  ------------------
 3214|   955k|                        output.append(static_cast<const HeapString *>(lhs.v.h)->value);
 3215|   955k|                    } else {
 3216|  10.4k|                        scratch = lhs;
 3217|  10.4k|                        output.append(toString(ast.left->location));
 3218|  10.4k|                    }
 3219|   966k|                    const Value &rhs = stack.top().val2;
 3220|   966k|                    if (rhs.t == Value::STRING) {
  ------------------
  |  Branch (3220:25): [True: 743k, False: 222k]
  ------------------
 3221|   743k|                        output.append(static_cast<const HeapString *>(rhs.v.h)->value);
 3222|   743k|                    } else {
 3223|   222k|                        scratch = rhs;
 3224|   222k|                        output.append(toString(ast.right->location));
 3225|   222k|                    }
 3226|   966k|                    scratch = makeString(output);
 3227|   966k|                } break;
 3228|       |
 3229|  1.25M|                case FRAME_UNARY: {
  ------------------
  |  Branch (3229:17): [True: 1.25M, False: 93.7M]
  ------------------
 3230|  1.25M|                    const auto &ast = *static_cast<const Unary *>(f.ast);
 3231|  1.25M|                    switch (scratch.t) {
 3232|  1.16M|                        case Value::BOOLEAN:
  ------------------
  |  Branch (3232:25): [True: 1.16M, False: 92.6k]
  ------------------
 3233|  1.16M|                            if (ast.op == UOP_NOT) {
  ------------------
  |  Branch (3233:33): [True: 1.16M, False: 2]
  ------------------
 3234|  1.16M|                                scratch = makeBoolean(!scratch.v.b);
 3235|  1.16M|                            } else {
 3236|      2|                                throw makeError(ast.location,
 3237|      2|                                                "unary operator " + uop_string(ast.op) +
 3238|      2|                                                    " does not operate on booleans.");
 3239|      2|                            }
 3240|  1.16M|                            break;
 3241|       |
 3242|  1.16M|                        case Value::NUMBER:
  ------------------
  |  Branch (3242:25): [True: 92.5k, False: 1.16M]
  ------------------
 3243|  92.5k|                            switch (ast.op) {
 3244|  4.97k|                                case UOP_PLUS: break;
  ------------------
  |  Branch (3244:33): [True: 4.97k, False: 87.5k]
  ------------------
 3245|       |
 3246|  71.7k|                                case UOP_MINUS: scratch = makeNumber(-scratch.v.d); break;
  ------------------
  |  Branch (3246:33): [True: 71.7k, False: 20.7k]
  ------------------
 3247|       |
 3248|  15.7k|                                case UOP_BITWISE_NOT:
  ------------------
  |  Branch (3248:33): [True: 15.7k, False: 76.7k]
  ------------------
 3249|  15.7k|                                    scratch = makeNumber(~(long)(scratch.v.d));
 3250|  15.7k|                                    break;
 3251|       |
 3252|     19|                                default:
  ------------------
  |  Branch (3252:33): [True: 19, False: 92.5k]
  ------------------
 3253|     19|                                    throw makeError(ast.location,
 3254|     19|                                                    "unary operator " + uop_string(ast.op) +
 3255|     19|                                                        " does not operate on numbers.");
 3256|  92.5k|                            }
 3257|  92.5k|                            break;
 3258|       |
 3259|  92.5k|                        default:
  ------------------
  |  Branch (3259:25): [True: 88, False: 1.25M]
  ------------------
 3260|     88|                            throw makeError(ast.location,
 3261|     88|                                            "unary operator " + uop_string(ast.op) +
 3262|     88|                                                " does not operate on type " + type_str(scratch));
 3263|  1.25M|                    }
 3264|  1.25M|                } break;
 3265|       |
 3266|  1.25M|                case FRAME_BUILTIN_JOIN_STRINGS: {
  ------------------
  |  Branch (3266:17): [True: 0, False: 94.9M]
  ------------------
 3267|      0|                    joinString(f.first, f.str, f.val, f.elementId, scratch);
 3268|      0|                    f.elementId++;
 3269|      0|                    auto *ast = joinStrings();
 3270|      0|                    if (ast != nullptr) {
  ------------------
  |  Branch (3270:25): [True: 0, False: 0]
  ------------------
 3271|      0|                        ast_ = ast;
 3272|      0|                        goto recurse;
 3273|      0|                    }
 3274|      0|                } break;
 3275|       |
 3276|      0|                case FRAME_BUILTIN_JOIN_ARRAYS: {
  ------------------
  |  Branch (3276:17): [True: 0, False: 94.9M]
  ------------------
 3277|      0|                    joinArray(f.first, f.thunks, f.val, f.elementId, scratch);
 3278|      0|                    f.elementId++;
 3279|      0|                    auto *ast = joinArrays();
 3280|      0|                    if (ast != nullptr) {
  ------------------
  |  Branch (3280:25): [True: 0, False: 0]
  ------------------
 3281|      0|                        ast_ = ast;
 3282|      0|                        goto recurse;
 3283|      0|                    }
 3284|      0|                } break;
 3285|       |
 3286|      0|                 case FRAME_BUILTIN_DECODE_UTF8: {
  ------------------
  |  Branch (3286:18): [True: 0, False: 94.9M]
  ------------------
 3287|      0|                    auto *ast = decodeUTF8();
 3288|      0|                    if (ast != nullptr) {
  ------------------
  |  Branch (3288:25): [True: 0, False: 0]
  ------------------
 3289|      0|                        ast_ = ast;
 3290|      0|                        goto recurse;
 3291|      0|                    }
 3292|      0|                } break;
 3293|       |
 3294|      0|                default:
  ------------------
  |  Branch (3294:17): [True: 0, False: 94.9M]
  ------------------
 3295|      0|                    std::cerr << "INTERNAL ERROR: Unknown FrameKind:  " << f.kind << std::endl;
 3296|      0|                    std::abort();
 3297|  94.9M|            }
 3298|       |
 3299|  42.1M|        popframe:;
 3300|       |
 3301|  42.1M|            stack.pop();
 3302|       |
 3303|  49.6M|        replaceframe:;
 3304|  49.6M|        }
 3305|  50.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack8newFrameIJNS1_9FrameKindEPKNS0_3ASTEEEEvDpT_:
  388|  38.8M|    {
  389|  38.8M|        stack.emplace_back(args...);
  390|  38.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15FrameC2ERKNS1_9FrameKindEPKNS0_3ASTE:
  194|  38.8M|        : kind(kind),
  195|  38.8M|          ast(ast),
  196|  38.8M|          location(ast->location),
  197|  38.8M|          tailCall(false),
  198|  38.8M|          elementId(0),
  199|  38.8M|          first(false),
  200|  38.8M|          context(NULL),
  201|  38.8M|          self(NULL),
  202|  38.8M|          offset(0)
  203|  38.8M|    {
  204|  38.8M|        val.t = Value::NULL_TYPE;
  205|  38.8M|        val2.t = Value::NULL_TYPE;
  206|  38.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack14getSelfBindingERPNS1_10HeapObjectERj:
  444|  23.0M|    {
  445|  23.0M|        self = nullptr;
  446|  23.0M|        offset = 0;
  447|  76.6M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (447:40): [True: 76.5M, False: 14.3k]
  ------------------
  448|  76.5M|            if (stack[i].isCall()) {
  ------------------
  |  Branch (448:17): [True: 23.0M, False: 53.5M]
  ------------------
  449|  23.0M|                self = stack[i].self;
  450|  23.0M|                offset = stack[i].offset;
  451|  23.0M|                return;
  452|  23.0M|            }
  453|  76.5M|        }
  454|  23.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  577|  19.8M|    {
  578|  19.8M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  19.8M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 16.1k, False: 19.8M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  16.1k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  16.1k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  16.1k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  16.1k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 16.1k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|  2.60M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 2.60M, False: 16.1k]
  ------------------
  597|  2.60M|                heap.markFrom(sourceVal.second);
  598|  2.60M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  16.1k|            heap.sweep();
  602|  16.1k|        }
  603|  19.8M|        return r;
  604|  19.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter7captureERKNSt3__16vectorIPKNS0_10IdentifierENS3_9allocatorIS7_EEEE:
  861|  35.9M|    {
  862|  35.9M|        BindingFrame env;
  863|   688M|        for (auto fv : free_vars) {
  ------------------
  |  Branch (863:22): [True: 688M, False: 35.9M]
  ------------------
  864|   688M|            auto *th = stack.lookUpVar(fv);
  865|   688M|            env[fv] = th;
  866|   688M|        }
  867|  35.9M|        return env;
  868|  35.9M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack8newFrameIJNS1_9FrameKindENS0_13LocationRangeEEEEvDpT_:
  388|  7.58M|    {
  389|  7.58M|        stack.emplace_back(args...);
  390|  7.58M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeClosureERKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS3_4lessIS7_EENS3_9allocatorINS3_4pairIKS7_S9_EEEEEEPNS1_10HeapObjectEjRKNS3_6vectorINS1_11HeapClosure5ParamENSC_ISO_EEEEPNS0_3ASTE:
  650|  1.38M|    {
  651|  1.38M|        Value r;
  652|  1.38M|        r.t = Value::FUNCTION;
  653|  1.38M|        r.v.h = makeHeap<HeapClosure>(env, self, offset, params, body, "");
  654|  1.38M|        return r;
  655|  1.38M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_11HeapClosureEJRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEERPNS1_10HeapObjectERjRKNS5_6vectorINS4_5ParamENSE_ISR_EEEERPNS0_3ASTERA1_KcEEEPT_DpOT0_:
  577|  1.38M|    {
  578|  1.38M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  1.38M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 3.24k, False: 1.37M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  3.24k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  3.24k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  3.24k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  3.24k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 3.24k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|   522k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 522k, False: 3.24k]
  ------------------
  597|   522k|                heap.markFrom(sourceVal.second);
  598|   522k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  3.24k|            heap.sweep();
  602|  3.24k|        }
  603|  1.38M|        return r;
  604|  1.38M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter6importERKNS0_13LocationRangeEPKNS0_13LiteralStringE:
  792|     27|    {
  793|     27|        ImportCacheValue *input = importData(loc, file);
  794|     27|        if (input->thunk == nullptr) {
  ------------------
  |  Branch (794:13): [True: 0, False: 27]
  ------------------
  795|      0|            Tokens tokens = jsonnet_lex(input->foundHere, input->content.c_str());
  796|      0|            AST *expr = jsonnet_parse(alloc, tokens);
  797|      0|            jsonnet_desugar(alloc, expr, nullptr);
  798|      0|            jsonnet_static_analysis(expr);
  799|       |            // If no errors then populate cache.
  800|      0|            auto *thunk = makeHeap<HeapThunk>(idImport, nullptr, 0, expr);
  801|      0|            input->thunk = thunk;
  802|      0|        }
  803|     27|        return input->thunk;
  804|     27|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10importDataERKNS0_13LocationRangeEPKNS0_13LiteralStringE:
  816|     45|    {
  817|       |        // `dir` is passed to the importCallback, which may be externally defined.
  818|       |        // For backwards compatibility, we need to keep the trailing directory separator.
  819|       |        // For example, the default callback in libjsonnet.cpp joins paths with simple
  820|       |        // string concatenation. Other (external) implementations might do the same.
  821|     45|        std::string dir = path_dir_with_trailing_separator(loc.file);
  822|       |
  823|     45|        const UString &path = file->value;
  824|       |
  825|     45|        std::pair<std::string, UString> key(dir, path);
  826|     45|        ImportCacheValue *cached_value = cachedImports[key];
  827|     45|        if (cached_value != nullptr)
  ------------------
  |  Branch (827:13): [True: 0, False: 45]
  ------------------
  828|      0|            return cached_value;
  829|       |
  830|     45|        char *found_here_cptr;
  831|     45|        char *buf = NULL;
  832|     45|        size_t buflen = 0;
  833|     45|        int result = importCallback(importCallbackContext,
  834|     45|                                    dir.c_str(),
  835|     45|                                    encode_utf8(path).c_str(),
  836|     45|                                    &found_here_cptr,
  837|     45|                                    &buf,
  838|     45|                                    &buflen);
  839|       |
  840|     45|        std::string input(buf, buflen);
  841|     45|        ::free(buf);
  842|       |
  843|     45|        if (result == 1) {  // failure
  ------------------
  |  Branch (843:13): [True: 45, False: 0]
  ------------------
  844|     45|            std::string epath = encode_utf8(jsonnet_string_escape(path, false));
  845|     45|            std::string msg = "couldn't open import \"" + epath + "\": ";
  846|     45|            msg += input;
  847|     45|            throw makeError(loc, msg);
  848|     45|        }
  849|       |
  850|      0|        auto *input_ptr = new ImportCacheValue();
  851|      0|        input_ptr->foundHere = found_here_cptr;
  852|      0|        input_ptr->content = input;
  853|      0|        input_ptr->thunk = nullptr;  // May be filled in later by import().
  854|      0|        ::free(found_here_cptr);
  855|      0|        cachedImports[key] = input_ptr;
  856|      0|        return input_ptr;
  857|     45|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRKPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  577|  12.3M|    {
  578|  12.3M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  12.3M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 15.5k, False: 12.3M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  15.5k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  15.5k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  15.5k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  15.5k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 15.5k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|  2.50M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 2.50M, False: 15.5k]
  ------------------
  597|  2.50M|                heap.markFrom(sourceVal.second);
  598|  2.50M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  15.5k|            heap.sweep();
  602|  15.5k|        }
  603|  12.3M|        return r;
  604|  12.3M|    }
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_:
  671|  1.54M|    {
  672|  1.54M|        Value r;
  673|  1.54M|        r.t = Value::OBJECT;
  674|  1.54M|        r.v.h = makeHeap<T>(args...);
  675|  1.54M|        return r;
  676|  1.54M|    }
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_:
  577|  1.54M|    {
  578|  1.54M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  1.54M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 2.34k, False: 1.54M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  2.34k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  2.34k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  2.34k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  2.34k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 2.34k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|   377k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 377k, False: 2.34k]
  ------------------
  597|   377k|                heap.markFrom(sourceVal.second);
  598|   377k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  2.34k|            heap.sweep();
  602|  2.34k|        }
  603|  1.54M|        return r;
  604|  1.54M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack9lookUpVarEPKNS0_10IdentifierE:
  269|   705M|    {
  270|  1.01G|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (270:40): [True: 1.01G, False: 0]
  ------------------
  271|  1.01G|            const auto &binds = stack[i].bindings;
  272|  1.01G|            auto it = binds.find(id);
  273|  1.01G|            if (it != binds.end()) {
  ------------------
  |  Branch (273:17): [True: 705M, False: 307M]
  ------------------
  274|   705M|                return it->second;
  275|   705M|            }
  276|   307M|            if (stack[i].isCall())
  ------------------
  |  Branch (276:17): [True: 0, False: 307M]
  ------------------
  277|      0|                break;
  278|   307M|        }
  279|      0|        return nullptr;
  280|   705M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack4sizeEv:
  263|   113M|    {
  264|   113M|        return stack.size();
  265|   113M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPKNS0_3ASTEEEEPT_DpOT0_:
  577|    112|    {
  578|    112|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|    112|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 112]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|      0|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|      0|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|      0|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|      0|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 0]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|      0|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 0, False: 0]
  ------------------
  597|      0|                heap.markFrom(sourceVal.second);
  598|      0|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|      0|            heap.sweep();
  602|      0|        }
  603|    112|        return r;
  604|    112|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10findObjectEPKNS0_10IdentifierEPNS1_10HeapObjectEjRj:
  698|   667M|    {
  699|   667M|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(curr)) {
  ------------------
  |  Branch (699:19): [True: 331M, False: 336M]
  ------------------
  700|   331M|            auto *r = findObject(f, ext->right, start_from, counter);
  701|   331M|            if (r)
  ------------------
  |  Branch (701:17): [True: 5.99M, False: 325M]
  ------------------
  702|  5.99M|                return r;
  703|   325M|            auto *l = findObject(f, ext->left, start_from, counter);
  704|   325M|            if (l)
  ------------------
  |  Branch (704:17): [True: 255M, False: 69.5M]
  ------------------
  705|   255M|                return l;
  706|   336M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(curr)) {
  ------------------
  |  Branch (706:26): [True: 0, False: 336M]
  ------------------
  707|       |            // The RestrictedObject is on the 'right', that is it is checked/counted first.
  708|      0|            if (counter >= start_from) {
  ------------------
  |  Branch (708:17): [True: 0, False: 0]
  ------------------
  709|      0|                if (ext->retainedKeys.find(f) == ext->retainedKeys.end()) {
  ------------------
  |  Branch (709:21): [True: 0, False: 0]
  ------------------
  710|      0|                    counter += 1 + countLeaves(ext->obj);
  711|      0|                    return nullptr;
  712|      0|                }
  713|      0|            }
  714|      0|            ++counter;
  715|      0|            return findObject(f, ext->obj, start_from, counter);
  716|   336M|        } else {
  717|   336M|            if (counter >= start_from) {
  ------------------
  |  Branch (717:17): [True: 29.9M, False: 306M]
  ------------------
  718|  29.9M|                if (auto *simp = dynamic_cast<HeapSimpleObject *>(curr)) {
  ------------------
  |  Branch (718:27): [True: 29.9M, False: 0]
  ------------------
  719|  29.9M|                    auto it = simp->fields.find(f);
  720|  29.9M|                    if (it != simp->fields.end()) {
  ------------------
  |  Branch (720:25): [True: 11.0M, False: 18.8M]
  ------------------
  721|  11.0M|                        return simp;
  722|  11.0M|                    }
  723|  29.9M|                } else if (auto *comp = dynamic_cast<HeapComprehensionObject *>(curr)) {
  ------------------
  |  Branch (723:34): [True: 0, False: 0]
  ------------------
  724|      0|                    auto it = comp->compValues.find(f);
  725|      0|                    if (it != comp->compValues.end()) {
  ------------------
  |  Branch (725:25): [True: 0, False: 0]
  ------------------
  726|      0|                        return comp;
  727|      0|                    }
  728|      0|                }
  729|  29.9M|            }
  730|   325M|            counter++;
  731|   325M|        }
  732|   394M|        return nullptr;
  733|   667M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13callSourceValEPKNS0_3ASTEPNS1_9HeapThunkENSt3__16vectorIS7_NS8_9allocatorIS7_EEEE:
 2070|  16.0k|    const AST *callSourceVal(const AST *ast, HeapThunk *sourceVal, std::vector<HeapThunk*> args) {
 2071|  16.0k|        assert(sourceVal != nullptr);
  ------------------
  |  Branch (2071:9): [True: 16.0k, False: 0]
  ------------------
 2072|  16.0k|        assert(sourceVal->filled);
  ------------------
  |  Branch (2072:9): [True: 16.0k, False: 0]
  ------------------
 2073|  16.0k|        assert(sourceVal->content.t == Value::FUNCTION);
  ------------------
  |  Branch (2073:9): [True: 16.0k, False: 0]
  ------------------
 2074|  16.0k|        auto *func = static_cast<HeapClosure *>(sourceVal->content.v.h);
 2075|  16.0k|        BindingFrame up_values = func->upValues;
 2076|  48.1k|        for (size_t i = 0; i < args.size(); ++i) {
  ------------------
  |  Branch (2076:28): [True: 32.0k, False: 16.0k]
  ------------------
 2077|  32.0k|            up_values.insert({func->params[i].id, args[i]});
 2078|  32.0k|        }
 2079|  16.0k|        stack.newCall(ast->location, func, func->self, func->offset, up_values);
 2080|  16.0k|        return func->body;
 2081|  16.0k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter17safeDoubleToInt64EdRKNS0_13LocationRangeE:
  919|  94.9k|    int64_t safeDoubleToInt64(double value, const internal::LocationRange& loc) {
  920|  94.9k|        if (std::isnan(value) || std::isinf(value)) {
  ------------------
  |  Branch (920:13): [True: 0, False: 94.9k]
  |  Branch (920:34): [True: 0, False: 94.9k]
  ------------------
  921|      0|            throw internal::StaticError(loc, "numeric value is not finite");
  922|      0|        }
  923|       |
  924|       |        // Constants for safe double-to-int conversion
  925|       |        // Jsonnet uses IEEE 754 doubles, which precisely represent integers in the range [-2^53 + 1, 2^53 - 1].
  926|  94.9k|        constexpr int64_t DOUBLE_MAX_SAFE_INTEGER = (1LL << 53) - 1;
  927|  94.9k|        constexpr int64_t DOUBLE_MIN_SAFE_INTEGER = -((1LL << 53) - 1);
  928|       |
  929|       |        // Check if the value is within the safe integer range
  930|  94.9k|        if (value < DOUBLE_MIN_SAFE_INTEGER || value > DOUBLE_MAX_SAFE_INTEGER) {
  ------------------
  |  Branch (930:13): [True: 1, False: 94.9k]
  |  Branch (930:48): [True: 1, False: 94.9k]
  ------------------
  931|      2|            throw makeError(loc, "numeric value outside safe integer range for bitwise operation.");
  932|      2|        }
  933|  94.9k|        return static_cast<int64_t>(value);
  934|  94.9k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeObjectINS1_18HeapExtendedObjectEJPNS1_10HeapObjectES6_EEENS1_5ValueEDpT0_:
  671|   970k|    {
  672|   970k|        Value r;
  673|   970k|        r.t = Value::OBJECT;
  674|   970k|        r.v.h = makeHeap<T>(args...);
  675|   970k|        return r;
  676|   970k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_18HeapExtendedObjectEJRPNS1_10HeapObjectES7_EEEPT_DpOT0_:
  577|   970k|    {
  578|   970k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   970k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 1.03k, False: 969k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  1.03k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  1.03k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  1.03k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  1.03k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 1.03k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|   166k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 166k, False: 1.03k]
  ------------------
  597|   166k|                heap.markFrom(sourceVal.second);
  598|   166k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  1.03k|            heap.sweep();
  602|  1.03k|        }
  603|   970k|        return r;
  604|   970k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8toStringERKNS0_13LocationRangeE:
 1979|   232k|    {
 1980|   232k|        return manifestJson(loc, false, U"");
 1981|   232k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11countLeavesEPNS1_10HeapObjectE:
  876|  1.67G|    {
  877|  1.67G|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(obj)) {
  ------------------
  |  Branch (877:19): [True: 837M, False: 841M]
  ------------------
  878|   837M|            return countLeaves(ext->left) + countLeaves(ext->right);
  879|   841M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(obj)) {
  ------------------
  |  Branch (879:26): [True: 0, False: 841M]
  ------------------
  880|      0|            return countLeaves(ext->obj) + 1;
  881|   841M|        } else {
  882|       |            // Must be a HeapLeafObject.
  883|   841M|            return 1;
  884|   841M|        }
  885|  1.67G|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11objectIndexERKNS0_13LocationRangeEPNS1_10HeapObjectEPKNS0_10IdentifierEj:
 2018|  9.38M|    {
 2019|  9.38M|        unsigned found_at = 0;
 2020|  9.38M|        HeapObject *self = obj;
 2021|  9.38M|        HeapLeafObject *found = findObject(f, obj, offset, found_at);
 2022|  9.38M|        if (found == nullptr) {
  ------------------
  |  Branch (2022:13): [True: 10, False: 9.38M]
  ------------------
 2023|     10|            throw makeError(loc, "field does not exist: " + encode_utf8(f->name));
 2024|     10|        }
 2025|  9.38M|        if (auto *simp = dynamic_cast<HeapSimpleObject *>(found)) {
  ------------------
  |  Branch (2025:19): [True: 9.38M, False: 0]
  ------------------
 2026|  9.38M|            auto it = simp->fields.find(f);
 2027|  9.38M|            const AST *body = it->second.body;
 2028|       |
 2029|  9.38M|            stack.newCall(loc, simp, self, found_at, simp->upValues);
 2030|  9.38M|            return body;
 2031|  9.38M|        } else {
 2032|       |            // If a HeapLeafObject is not HeapSimpleObject, it must be HeapComprehensionObject.
 2033|      0|            auto *comp = static_cast<HeapComprehensionObject *>(found);
 2034|      0|            auto it = comp->compValues.find(f);
 2035|      0|            auto *th = it->second;
 2036|      0|            BindingFrame binds = comp->upValues;
 2037|      0|            binds[comp->id] = th;
 2038|      0|            stack.newCall(loc, comp, self, found_at, binds);
 2039|      0|            return comp->value;
 2040|      0|        }
 2041|  9.38M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack26alreadyExecutingInvariantsEPNS1_10HeapObjectE:
  458|  7.59M|    {
  459|  2.18G|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (459:40): [True: 2.17G, False: 7.58M]
  ------------------
  460|  2.17G|            if (stack[i].kind == FRAME_INVARIANTS) {
  ------------------
  |  Branch (460:17): [True: 14.1M, False: 2.16G]
  ------------------
  461|  14.1M|                if (stack[i].self == self)
  ------------------
  |  Branch (461:21): [True: 10.0k, False: 14.1M]
  ------------------
  462|  10.0k|                    return true;
  463|  14.1M|            }
  464|  2.17G|        }
  465|  7.58M|        return false;
  466|  7.59M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter16objectInvariantsEPNS1_10HeapObjectES4_RjRNSt3__16vectorIPNS1_9HeapThunkENS6_9allocatorIS9_EEEE:
 1992|  37.5M|    {
 1993|  37.5M|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(curr)) {
  ------------------
  |  Branch (1993:19): [True: 14.9M, False: 22.5M]
  ------------------
 1994|  14.9M|            objectInvariants(ext->right, self, counter, thunks);
 1995|  14.9M|            objectInvariants(ext->left, self, counter, thunks);
 1996|  22.5M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(curr)) {
  ------------------
  |  Branch (1996:26): [True: 0, False: 22.5M]
  ------------------
 1997|      0|            objectInvariants(ext->obj, self, counter, thunks);
 1998|  22.5M|        } else {
 1999|  22.5M|            if (auto *simp = dynamic_cast<HeapSimpleObject *>(curr)) {
  ------------------
  |  Branch (1999:23): [True: 22.5M, False: 0]
  ------------------
 2000|  22.5M|                for (AST *assert : simp->asserts) {
  ------------------
  |  Branch (2000:34): [True: 1.82M, False: 22.5M]
  ------------------
 2001|  1.82M|                    auto *el_th = makeHeap<HeapThunk>(idInvariant, self, counter, assert);
 2002|  1.82M|                    el_th->upValues = simp->upValues;
 2003|  1.82M|                    thunks.push_back(el_th);
 2004|  1.82M|                }
 2005|  22.5M|            }
 2006|  22.5M|            counter++;
 2007|  22.5M|        }
 2008|  37.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRPNS0_3ASTEEEEPT_DpOT0_:
  577|  1.82M|    {
  578|  1.82M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  1.82M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 172, False: 1.82M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|    172|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|    172|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|    172|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|    172|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 172]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|  27.6k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 27.6k, False: 172]
  ------------------
  597|  27.6k|                heap.markFrom(sourceVal.second);
  598|  27.6k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|    172|            heap.sweep();
  602|    172|        }
  603|  1.82M|        return r;
  604|  1.82M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12manifestJsonERKNS0_13LocationRangeEbRKNSt3__112basic_stringIDiNS6_11char_traitsIDiEENS6_9allocatorIDiEEEE:
 3315|  5.70M|    {
 3316|       |        // Printing fields means evaluating and binding them, which can trigger
 3317|       |        // garbage collection.
 3318|       |
 3319|  5.70M|        UStringStream ss;
 3320|  5.70M|        switch (scratch.t) {
  ------------------
  |  Branch (3320:17): [True: 5.70M, False: 0]
  ------------------
 3321|   127k|            case Value::ARRAY: {
  ------------------
  |  Branch (3321:13): [True: 127k, False: 5.57M]
  ------------------
 3322|   127k|                HeapArray *arr = static_cast<HeapArray *>(scratch.v.h);
 3323|   127k|                if (arr->elements.size() == 0) {
  ------------------
  |  Branch (3323:21): [True: 34.1k, False: 93.3k]
  ------------------
 3324|  34.1k|                    ss << U"[ ]";
 3325|  93.3k|                } else {
 3326|  93.3k|                    const char32_t *prefix = multiline ? U"[\n" : U"[";
  ------------------
  |  Branch (3326:46): [True: 73.4k, False: 19.9k]
  ------------------
 3327|  93.3k|                    UString indent2 = multiline ? indent + U"   " : indent;
  ------------------
  |  Branch (3327:39): [True: 73.4k, False: 19.9k]
  ------------------
 3328|  4.78M|                    for (auto *thunk : arr->elements) {
  ------------------
  |  Branch (3328:38): [True: 4.78M, False: 93.3k]
  ------------------
 3329|  4.78M|                        LocationRange tloc = thunk->body == nullptr ? loc : thunk->body->location;
  ------------------
  |  Branch (3329:46): [True: 0, False: 4.78M]
  ------------------
 3330|  4.78M|                        if (thunk->filled) {
  ------------------
  |  Branch (3330:29): [True: 0, False: 4.78M]
  ------------------
 3331|      0|                            stack.newCall(loc, thunk, nullptr, 0, BindingFrame{});
 3332|       |                            // Keep arr alive when scratch is overwritten
 3333|      0|                            stack.top().val = scratch;
 3334|      0|                            scratch = thunk->content;
 3335|  4.78M|                        } else {
 3336|  4.78M|                            stack.newCall(loc, thunk, thunk->self, thunk->offset, thunk->upValues);
 3337|       |                            // Keep arr alive when scratch is overwritten
 3338|  4.78M|                            stack.top().val = scratch;
 3339|  4.78M|                            evaluate(thunk->body, stack.size());
 3340|  4.78M|                        }
 3341|  4.78M|                        auto element = manifestJson(tloc, multiline, indent2);
 3342|       |                        // Restore scratch
 3343|  4.78M|                        scratch = stack.top().val;
 3344|  4.78M|                        stack.pop();
 3345|  4.78M|                        ss << prefix << indent2 << element;
 3346|  4.78M|                        prefix = multiline ? U",\n" : U", ";
  ------------------
  |  Branch (3346:34): [True: 2.28M, False: 2.49M]
  ------------------
 3347|  4.78M|                    }
 3348|  93.3k|                    ss << (multiline ? U"\n" : U"") << indent << U"]";
  ------------------
  |  Branch (3348:28): [True: 57.2k, False: 36.1k]
  ------------------
 3349|  93.3k|                }
 3350|   127k|            } break;
 3351|       |
 3352|  61.8k|            case Value::BOOLEAN: ss << (scratch.v.b ? U"true" : U"false"); break;
  ------------------
  |  Branch (3352:13): [True: 61.8k, False: 5.64M]
  |  Branch (3352:41): [True: 17.1k, False: 44.6k]
  ------------------
 3353|       |
 3354|  4.84M|            case Value::NUMBER: ss << decode_utf8(jsonnet_unparse_number(scratch.v.d)); break;
  ------------------
  |  Branch (3354:13): [True: 4.84M, False: 861k]
  ------------------
 3355|       |
 3356|     19|            case Value::FUNCTION:
  ------------------
  |  Branch (3356:13): [True: 19, False: 5.70M]
  ------------------
 3357|     19|                throw makeError(loc, "couldn't manifest function in JSON output.");
 3358|       |
 3359|  3.83k|            case Value::NULL_TYPE: ss << U"null"; break;
  ------------------
  |  Branch (3359:13): [True: 3.83k, False: 5.70M]
  ------------------
 3360|       |
 3361|   615k|            case Value::OBJECT: {
  ------------------
  |  Branch (3361:13): [True: 615k, False: 5.09M]
  ------------------
 3362|   615k|                auto *obj = static_cast<HeapObject *>(scratch.v.h);
 3363|   615k|                runInvariants(loc, obj);
 3364|       |                // Using std::map has the useful side-effect of ordering the fields
 3365|       |                // alphabetically.
 3366|   615k|                std::map<UString, const Identifier *> fields;
 3367|   743k|                for (const auto &f : objectFields(obj, true)) {
  ------------------
  |  Branch (3367:36): [True: 743k, False: 615k]
  ------------------
 3368|   743k|                    fields[f->name] = f;
 3369|   743k|                }
 3370|   615k|                if (fields.size() == 0) {
  ------------------
  |  Branch (3370:21): [True: 123k, False: 491k]
  ------------------
 3371|   123k|                    ss << U"{ }";
 3372|   491k|                } else {
 3373|   491k|                    UString indent2 = multiline ? indent + U"   " : indent;
  ------------------
  |  Branch (3373:39): [True: 147k, False: 344k]
  ------------------
 3374|   491k|                    const char32_t *prefix = multiline ? U"{\n" : U"{";
  ------------------
  |  Branch (3374:46): [True: 147k, False: 344k]
  ------------------
 3375|   702k|                    for (const auto &f : fields) {
  ------------------
  |  Branch (3375:40): [True: 702k, False: 491k]
  ------------------
 3376|       |                        // pushes FRAME_CALL
 3377|   702k|                        const AST *body = objectIndex(loc, obj, f.second, 0);
 3378|   702k|                        stack.top().val = scratch;
 3379|   702k|                        evaluate(body, stack.size());
 3380|   702k|                        auto vstr = manifestJson(body->location, multiline, indent2);
 3381|       |                        // Reset scratch so that the object we're manifesting doesn't
 3382|       |                        // get GC'd.
 3383|   702k|                        scratch = stack.top().val;
 3384|   702k|                        stack.pop();
 3385|   702k|                        ss << prefix << indent2 << jsonnet_string_unparse(f.first, false) << U": "
 3386|   702k|                           << vstr;
 3387|   702k|                        prefix = multiline ? U",\n" : U", ";
  ------------------
  |  Branch (3387:34): [True: 220k, False: 482k]
  ------------------
 3388|   702k|                    }
 3389|   491k|                    ss << (multiline ? U"\n" : U"") << indent << U"}";
  ------------------
  |  Branch (3389:28): [True: 42.5k, False: 449k]
  ------------------
 3390|   491k|                }
 3391|   615k|            } break;
 3392|       |
 3393|  52.9k|            case Value::STRING: {
  ------------------
  |  Branch (3393:13): [True: 52.9k, False: 5.65M]
  ------------------
 3394|  52.9k|                const UString &str = static_cast<HeapString *>(scratch.v.h)->value;
 3395|  52.9k|                ss << jsonnet_string_unparse(str, false);
 3396|  52.9k|            } break;
 3397|  5.70M|        }
 3398|  5.53M|        return ss.str();
 3399|  5.70M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13runInvariantsERKNS0_13LocationRangeEPNS1_10HeapObjectE:
 2044|   616k|    {
 2045|   616k|        if (stack.alreadyExecutingInvariants(self))
  ------------------
  |  Branch (2045:13): [True: 1.68k, False: 615k]
  ------------------
 2046|  1.68k|            return;
 2047|       |
 2048|   615k|        unsigned counter = 0;
 2049|   615k|        unsigned initial_stack_size = stack.size();
 2050|   615k|        stack.newFrame(FRAME_INVARIANTS, loc);
 2051|   615k|        std::vector<HeapThunk *> &thunks = stack.top().thunks;
 2052|   615k|        objectInvariants(self, self, counter, thunks);
 2053|   615k|        if (thunks.size() == 0) {
  ------------------
  |  Branch (2053:13): [True: 604k, False: 10.7k]
  ------------------
 2054|   604k|            stack.pop();
 2055|   604k|            return;
 2056|   604k|        }
 2057|  10.7k|        HeapThunk *thunk = thunks[0];
 2058|  10.7k|        stack.top().elementId = 1;
 2059|  10.7k|        stack.top().self = self;
 2060|  10.7k|        stack.newCall(loc, thunk, thunk->self, thunk->offset, thunk->upValues);
 2061|  10.7k|        evaluate(thunk->body, initial_stack_size);
 2062|  10.7k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111InterpreterD2Ev:
 1024|  2.87k|    {
 1025|  2.87k|        for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (1025:31): [True: 45, False: 2.87k]
  ------------------
 1026|     45|            delete pair.second;
 1027|     45|        }
 1028|  2.87k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13manifestMultiEb:
 3412|  1.81k|    {
 3413|  1.81k|        StrMap r;
 3414|  1.81k|        LocationRange loc("During manifestation");
 3415|  1.81k|        if (scratch.t != Value::OBJECT) {
  ------------------
  |  Branch (3415:13): [True: 729, False: 1.08k]
  ------------------
 3416|    729|            std::stringstream ss;
 3417|    729|            ss << "multi mode: top-level object was a " << type_str(scratch.t) << ", "
 3418|    729|               << "should be an object whose keys are filenames and values hold "
 3419|    729|               << "the JSON for that file.";
 3420|    729|            throw makeError(loc, ss.str());
 3421|    729|        }
 3422|  1.08k|        auto *obj = static_cast<HeapObject *>(scratch.v.h);
 3423|  1.08k|        runInvariants(loc, obj);
 3424|  1.08k|        std::map<UString, const Identifier *> fields;
 3425|  4.54k|        for (const auto &f : objectFields(obj, true)) {
  ------------------
  |  Branch (3425:28): [True: 4.54k, False: 1.08k]
  ------------------
 3426|  4.54k|            fields[f->name] = f;
 3427|  4.54k|        }
 3428|  4.27k|        for (const auto &f : fields) {
  ------------------
  |  Branch (3428:28): [True: 4.27k, False: 1.08k]
  ------------------
 3429|       |            // pushes FRAME_CALL
 3430|  4.27k|            const AST *body = objectIndex(loc, obj, f.second, 0);
 3431|  4.27k|            stack.top().val = scratch;
 3432|  4.27k|            evaluate(body, stack.size());
 3433|  4.27k|            auto vstr =
 3434|  4.27k|                string ? manifestString(body->location) : manifestJson(body->location, true, U"");
  ------------------
  |  Branch (3434:17): [True: 0, False: 4.27k]
  ------------------
 3435|       |            // Reset scratch so that the object we're manifesting doesn't
 3436|       |            // get GC'd.
 3437|  4.27k|            scratch = stack.top().val;
 3438|  4.27k|            stack.pop();
 3439|  4.27k|            r[encode_utf8(f.first)] = encode_utf8(vstr);
 3440|  4.27k|        }
 3441|  1.08k|        return r;
 3442|  1.81k|    }

_ZN7jsonnet8internal10TraceFrameC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   33|   248k|        : location(location), name(name)
   34|   248k|    {
   35|   248k|    }
_ZN7jsonnet8internal12RuntimeErrorC2ENSt3__16vectorINS0_10TraceFrameENS2_9allocatorIS4_EEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS5_IcEEEE:
   45|  2.45k|        : stackTrace(stack_trace), msg(msg)
   46|  2.45k|    {
   47|  2.45k|    }

_ZN2c43yml9CallbacksC2Ev:
31979|      2|    m_user_data(nullptr),
31980|       |    #ifndef RYML_NO_DEFAULT_CALLBACKS
31981|      2|    m_allocate(allocate_impl),
31982|      2|    m_free(free_impl),
31983|      2|    m_error(error_impl)
31984|       |    #else
31985|       |    m_allocate(nullptr),
31986|       |    m_free(nullptr),
31987|       |    m_error(nullptr)
31988|       |    #endif
31989|      2|{
31990|      2|}

