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

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|  7.58k|    {
 1021|   109M|        for (auto x : allocated) {
  ------------------
  |  Branch (1021:21): [True: 109M, False: 7.58k]
  ------------------
 1022|   109M|            delete x;
 1023|   109M|        }
 1024|  7.58k|        allocated.clear();
 1025|  2.18M|        for (const auto &x : internedIdentifiers) {
  ------------------
  |  Branch (1025:28): [True: 2.18M, False: 7.58k]
  ------------------
 1026|  2.18M|            delete x.second;
 1027|  2.18M|        }
 1028|  7.58k|        internedIdentifiers.clear();
 1029|   178k|        for (const auto &x : internedBuiltins) {
  ------------------
  |  Branch (1029:28): [True: 178k, False: 7.58k]
  ------------------
 1030|   178k|            delete x.second;
 1031|   178k|        }
 1032|  7.58k|        internedBuiltins.clear();
 1033|  7.58k|    }
_ZN7jsonnet8internal10IdentifierC2ERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  113|  2.76M|    Identifier(const UString &name) : name(name) {}
_ZN7jsonnet8internal3ASTC2ERKNS0_13LocationRangeENS0_7ASTTypeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEE:
  132|  96.7M|        : location(location), type(type), openFodder(open_fodder)
  133|  96.7M|    {
  134|  96.7M|    }
_ZN7jsonnet8internal3ASTD2Ev:
  135|   109M|    virtual ~AST(void) {}
_ZN7jsonnet8internal8ArgParamC2ERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPKNS0_10IdentifierES9_:
  158|   621k|        : idFodder(id_fodder), id(id), expr(nullptr), commaFodder(comma_fodder)
  159|   621k|    {
  160|   621k|    }
_ZN7jsonnet8internal8ArgParamC2EPNS0_3ASTERKNSt3__16vectorINS0_13FodderElementENS4_9allocatorIS6_EEEE:
  163|  6.65M|        : id(nullptr), expr(expr), commaFodder(comma_fodder)
  164|  6.65M|    {
  165|  6.65M|    }
_ZN7jsonnet8internal8ArgParamC2ERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPKNS0_10IdentifierES9_PNS0_3ASTES9_:
  169|  14.2M|        : idFodder(id_fodder), id(id), eqFodder(eq_fodder), expr(expr), commaFodder(comma_fodder)
  170|  14.2M|    {
  171|  14.2M|    }
_ZN7jsonnet8internal17ComprehensionSpecC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEESA_PKNS0_10IdentifierESA_PNS0_3ASTE:
  187|   468k|        : kind(kind),
  188|   468k|          openFodder(open_fodder),
  189|   468k|          varFodder(var_fodder),
  190|   468k|          var(var),
  191|   468k|          inFodder(in_fodder),
  192|   468k|          expr(expr)
  193|   468k|    {
  194|   468k|    }
_ZN7jsonnet8internal5ApplyC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_RKNS6_INS0_8ArgParamENS8_ISF_EEEEbSC_SC_b:
  209|  9.84M|        : AST(lr, AST_APPLY, open_fodder),
  210|  9.84M|          target(target),
  211|  9.84M|          fodderL(fodder_l),
  212|  9.84M|          args(args),
  213|  9.84M|          trailingComma(trailing_comma),
  214|  9.84M|          fodderR(fodder_r),
  215|  9.84M|          tailstrictFodder(tailstrict_fodder),
  216|  9.84M|          tailstrict(tailstrict)
  217|  9.84M|    {
  218|  9.84M|    }
_ZN7jsonnet8internal10ApplyBraceC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESE_:
  226|   103k|        : AST(lr, AST_APPLY_BRACE, open_fodder), left(left), right(right)
  227|   103k|    {
  228|   103k|    }
_ZN7jsonnet8internal5Array7ElementC2EPNS0_3ASTERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  236|  3.20M|        Element(AST *expr, const Fodder &comma_fodder) : expr(expr), commaFodder(comma_fodder) {}
_ZN7jsonnet8internal5ArrayC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS1_7ElementENS8_ISD_EEEEbSC_:
  244|  1.44M|        : AST(lr, AST_ARRAY, open_fodder),
  245|  1.44M|          elements(elements),
  246|  1.44M|          trailingComma(trailing_comma),
  247|  1.44M|          closeFodder(close_fodder)
  248|  1.44M|    {
  249|  1.44M|    }
_ZN7jsonnet8internal18ArrayComprehensionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_bRKNS6_INS0_17ComprehensionSpecENS8_ISF_EEEESC_:
  262|   285k|        : AST(lr, AST_ARRAY_COMPREHENSION, open_fodder),
  263|   285k|          body(body),
  264|   285k|          commaFodder(comma_fodder),
  265|   285k|          trailingComma(trailing_comma),
  266|   285k|          specs(specs),
  267|   285k|          closeFodder(close_fodder)
  268|   285k|    {
  269|       |        assert(specs.size() > 0);
  ------------------
  |  Branch (269:9): [True: 285k, False: 0]
  ------------------
  270|   285k|    }
_ZN7jsonnet8internal6AssertC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SE_SC_SE_:
  286|   321k|        : AST(lr, AST_ASSERT, open_fodder),
  287|   321k|          cond(cond),
  288|   321k|          colonFodder(colon_fodder),
  289|   321k|          message(message),
  290|   321k|          semicolonFodder(semicolon_fodder),
  291|   321k|          rest(rest)
  292|   321k|    {
  293|   321k|    }
_ZN7jsonnet8internal6BinaryC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_NS0_8BinaryOpESE_:
  367|  7.93M|        : AST(lr, AST_BINARY, open_fodder), left(left), opFodder(op_fodder), op(op), right(right)
  368|  7.93M|    {
  369|  7.93M|    }
_ZN7jsonnet8internal19BuiltinFunctionBodyC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERKNS5_6vectorIPKNS0_10IdentifierENS9_ISH_EEEE:
  382|   178k|        : AST(lr, AST_BUILTIN_FUNCTION_BODY, Fodder{}), name(name), params(params)
  383|   178k|    {
  384|   178k|    }
_ZN7jsonnet8internal15BuiltinFunctionC2ERKNS0_13LocationRangeEPKNS0_19BuiltinFunctionBodyE:
  395|   328k|        : AST(lr, AST_BUILTIN_FUNCTION, Fodder{}), body(body)
  396|   328k|    {
  397|   328k|    }
_ZN7jsonnet8internal11ConditionalC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SE_SC_SE_:
  414|  3.74M|        : AST(lr, AST_CONDITIONAL, open_fodder),
  415|  3.74M|          cond(cond),
  416|  3.74M|          thenFodder(then_fodder),
  417|  3.74M|          branchTrue(branch_true),
  418|  3.74M|          elseFodder(else_fodder),
  419|  3.74M|          branchFalse(branch_false)
  420|  3.74M|    {
  421|  3.74M|    }
_ZN7jsonnet8internal6DollarC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  426|  40.0k|    Dollar(const LocationRange &lr, const Fodder &open_fodder) : AST(lr, AST_DOLLAR, open_fodder) {}
_ZN7jsonnet8internal5ErrorC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTE:
  433|  1.24M|        : AST(lr, AST_ERROR, open_fodder), expr(expr)
  434|  1.24M|    {
  435|  1.24M|    }
_ZN7jsonnet8internal8FunctionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEESC_RKNS6_INS0_8ArgParamENS8_ISD_EEEEbSC_PNS0_3ASTE:
  448|  2.03M|        : AST(lr, AST_FUNCTION, open_fodder),
  449|  2.03M|          parenLeftFodder(paren_left_fodder),
  450|  2.03M|          params(params),
  451|  2.03M|          trailingComma(trailing_comma),
  452|  2.03M|          parenRightFodder(paren_right_fodder),
  453|  2.03M|          body(body)
  454|  2.03M|    {
  455|  2.03M|    }
_ZN7jsonnet8internal6ImportC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  464|    356|        : AST(lr, AST_IMPORT, open_fodder), file(file)
  465|    356|    {
  466|    356|    }
_ZN7jsonnet8internal9ImportstrC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  473|  1.17k|        : AST(lr, AST_IMPORTSTR, open_fodder), file(file)
  474|  1.17k|    {
  475|  1.17k|    }
_ZN7jsonnet8internal9ImportbinC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_13LiteralStringE:
  482|    593|        : AST(lr, AST_IMPORTBIN, open_fodder), file(file)
  483|    593|    {
  484|    593|    }
_ZN7jsonnet8internal5IndexC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SC_PKNS0_10IdentifierE:
  505|  5.61M|        : AST(lr, AST_INDEX, open_fodder),
  506|  5.61M|          target(target),
  507|  5.61M|          dotFodder(dot_fodder),
  508|  5.61M|          isSlice(false),
  509|  5.61M|          index(nullptr),
  510|  5.61M|          end(nullptr),
  511|  5.61M|          step(nullptr),
  512|  5.61M|          idFodder(id_fodder),
  513|  5.61M|          id(id)
  514|  5.61M|    {
  515|  5.61M|    }
_ZN7jsonnet8internal5IndexC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_bSE_SC_SE_SC_SE_SC_:
  520|  4.54M|        : AST(lr, AST_INDEX, open_fodder),
  521|  4.54M|          target(target),
  522|  4.54M|          dotFodder(dot_fodder),
  523|  4.54M|          isSlice(is_slice),
  524|  4.54M|          index(index),
  525|  4.54M|          endColonFodder(end_colon_fodder),
  526|  4.54M|          end(end),
  527|  4.54M|          stepColonFodder(step_colon_fodder),
  528|  4.54M|          step(step),
  529|  4.54M|          idFodder(id_fodder),
  530|  4.54M|          id(nullptr)
  531|  4.54M|    {
  532|  4.54M|    }
_ZN7jsonnet8internal5Local4BindC2ERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEEPKNS0_10IdentifierESA_PNS0_3ASTEbSA_RKNS4_INS0_8ArgParamENS6_ISG_EEEEbSA_SA_:
  551|  3.25M|            : varFodder(var_fodder),
  552|  3.25M|              var(var),
  553|  3.25M|              opFodder(op_fodder),
  554|  3.25M|              body(body),
  555|  3.25M|              functionSugar(function_sugar),
  556|  3.25M|              parenLeftFodder(paren_left_fodder),
  557|  3.25M|              params(params),
  558|  3.25M|              trailingComma(trailing_comma),
  559|  3.25M|              parenRightFodder(paren_right_fodder),
  560|  3.25M|              closeFodder(close_fodder)
  561|  3.25M|        {
  562|  3.25M|        }
_ZN7jsonnet8internal5LocalC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS1_4BindENS8_ISD_EEEEPNS0_3ASTE:
  568|  3.65M|        : AST(lr, AST_LOCAL, open_fodder), binds(binds), body(body)
  569|  3.65M|    {
  570|  3.65M|    }
_ZN7jsonnet8internal14LiteralBooleanC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEb:
  577|   761k|        : AST(lr, AST_LITERAL_BOOLEAN, open_fodder), value(value)
  578|   761k|    {
  579|   761k|    }
_ZN7jsonnet8internal11LiteralNullC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  585|   407k|        : AST(lr, AST_LITERAL_NULL, open_fodder)
  586|   407k|    {
  587|   407k|    }
_ZN7jsonnet8internal13LiteralNumberC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS5_12basic_stringIcNS5_11char_traitsIcEENS8_IcEEEE:
  595|  6.06M|        : AST(lr, AST_LITERAL_NUMBER, open_fodder),
  596|  6.06M|          value(strtod(str.c_str(), nullptr)),
  597|  6.06M|          originalString(str)
  598|  6.06M|    {
  599|  6.06M|    }
_ZN7jsonnet8internal13LiteralStringC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS1_9TokenKindERKNSD_IcNSE_IcEENS8_IcEEEESP_:
  612|  15.0M|        : AST(lr, AST_LITERAL_STRING, open_fodder),
  613|  15.0M|          value(value),
  614|  15.0M|          tokenKind(token_kind),
  615|  15.0M|          blockIndent(block_indent),
  616|  15.0M|          blockTermIndent(block_term_indent)
  617|  15.0M|    {
  618|  15.0M|    }
_ZN7jsonnet8internal11ObjectFieldC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEESA_SA_SA_NS1_4HideEbbPNS0_3ASTEPKNS0_10IdentifierERKNS0_13LocationRangeERKNS4_INS0_8ArgParamENS6_ISK_EEEEbSA_SD_SD_SA_:
  682|  2.08M|        : kind(kind),
  683|  2.08M|          fodder1(fodder1),
  684|  2.08M|          fodder2(fodder2),
  685|  2.08M|          fodderL(fodder_l),
  686|  2.08M|          fodderR(fodder_r),
  687|  2.08M|          hide(hide),
  688|  2.08M|          superSugar(super_sugar),
  689|  2.08M|          methodSugar(method_sugar),
  690|  2.08M|          expr1(expr1),
  691|  2.08M|          id(id),
  692|  2.08M|          idLocation(id_lr),
  693|  2.08M|          params(params),
  694|  2.08M|          trailingComma(trailing_comma),
  695|  2.08M|          opFodder(op_fodder),
  696|  2.08M|          expr2(expr2),
  697|  2.08M|          expr3(expr3),
  698|  2.08M|          commaFodder(comma_fodder)
  699|  2.08M|    {
  700|       |        // Enforce what is written in comments above.
  701|  2.08M|        assert(kind != ASSERT || (hide == VISIBLE && !superSugar && !methodSugar));
  ------------------
  |  Branch (701:9): [True: 97.8k, False: 0]
  |  Branch (701:9): [True: 97.8k, False: 0]
  |  Branch (701:9): [True: 97.8k, False: 0]
  |  Branch (701:9): [True: 1.99M, False: 97.8k]
  |  Branch (701:9): [True: 2.08M, False: 0]
  ------------------
  702|  2.08M|        assert(kind != LOCAL || (hide == VISIBLE && !superSugar));
  ------------------
  |  Branch (702:9): [True: 81.6k, False: 0]
  |  Branch (702:9): [True: 81.6k, False: 0]
  |  Branch (702:9): [True: 2.00M, False: 81.6k]
  |  Branch (702:9): [True: 2.08M, False: 0]
  ------------------
  703|  2.08M|        assert(kind != FIELD_ID || (id != nullptr && expr1 == nullptr));
  ------------------
  |  Branch (703:9): [True: 1.77M, False: 0]
  |  Branch (703:9): [True: 1.77M, False: 0]
  |  Branch (703:9): [True: 311k, False: 1.77M]
  |  Branch (703:9): [True: 2.08M, False: 0]
  ------------------
  704|  2.08M|        assert(kind == FIELD_ID || kind == LOCAL || id == nullptr);
  ------------------
  |  Branch (704:9): [True: 1.77M, False: 311k]
  |  Branch (704:9): [True: 81.6k, False: 229k]
  |  Branch (704:9): [True: 229k, False: 0]
  |  Branch (704:9): [True: 2.08M, False: 0]
  ------------------
  705|  2.08M|        assert(methodSugar || (params.size() == 0 && !trailingComma));
  ------------------
  |  Branch (705:9): [True: 1.09M, False: 0]
  |  Branch (705:9): [True: 1.09M, False: 0]
  |  Branch (705:9): [True: 989k, False: 1.09M]
  |  Branch (705:9): [True: 2.08M, False: 0]
  ------------------
  706|  2.08M|        assert(kind == ASSERT || expr3 == nullptr);
  ------------------
  |  Branch (706:9): [True: 97.8k, False: 1.99M]
  |  Branch (706:9): [True: 1.99M, False: 0]
  |  Branch (706:9): [True: 2.08M, False: 0]
  ------------------
  707|  2.08M|    }
_ZN7jsonnet8internal11ObjectField5LocalERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEES9_S9_S9_bPKNS0_10IdentifierERKNS3_INS0_8ArgParamENS5_ISD_EEEEbS9_PNS0_3ASTES9_:
  713|  55.4k|    {
  714|  55.4k|        return ObjectField(LOCAL,
  715|  55.4k|                           fodder1,
  716|  55.4k|                           fodder2,
  717|  55.4k|                           fodder_l,
  718|  55.4k|                           fodder_r,
  719|  55.4k|                           VISIBLE,
  720|  55.4k|                           false,
  721|  55.4k|                           method_sugar,
  722|  55.4k|                           nullptr,
  723|  55.4k|                           id,
  724|  55.4k|                           LocationRange(),
  725|  55.4k|                           params,
  726|  55.4k|                           trailing_comma,
  727|  55.4k|                           op_fodder,
  728|  55.4k|                           body,
  729|  55.4k|                           nullptr,
  730|  55.4k|                           comma_fodder);
  731|  55.4k|    }
_ZN7jsonnet8internal11ObjectField5LocalERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEES9_PKNS0_10IdentifierES9_PNS0_3ASTES9_:
  734|  26.1k|    {
  735|  26.1k|        return ObjectField(LOCAL,
  736|  26.1k|                           fodder1,
  737|  26.1k|                           fodder2,
  738|  26.1k|                           Fodder{},
  739|  26.1k|                           Fodder{},
  740|  26.1k|                           VISIBLE,
  741|  26.1k|                           false,
  742|  26.1k|                           false,
  743|  26.1k|                           nullptr,
  744|  26.1k|                           id,
  745|  26.1k|                           LocationRange(),
  746|  26.1k|                           ArgParams{},
  747|  26.1k|                           false,
  748|  26.1k|                           op_fodder,
  749|  26.1k|                           body,
  750|  26.1k|                           nullptr,
  751|  26.1k|                           comma_fodder);
  752|  26.1k|    }
_ZN7jsonnet8internal11ObjectField6AssertERKNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEEPNS0_3ASTES9_SB_S9_:
  779|  97.8k|    {
  780|  97.8k|        return ObjectField(ASSERT,
  781|  97.8k|                           fodder1,
  782|  97.8k|                           Fodder{},
  783|  97.8k|                           Fodder{},
  784|  97.8k|                           Fodder{},
  785|  97.8k|                           VISIBLE,
  786|  97.8k|                           false,
  787|  97.8k|                           false,
  788|  97.8k|                           nullptr,
  789|  97.8k|                           nullptr,
  790|  97.8k|                           LocationRange(),
  791|  97.8k|                           ArgParams{},
  792|  97.8k|                           false,
  793|  97.8k|                           op_fodder,
  794|  97.8k|                           body,
  795|  97.8k|                           msg,
  796|  97.8k|                           comma_fodder);
  797|  97.8k|    }
_ZN7jsonnet8internal6ObjectC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS0_11ObjectFieldENS8_ISD_EEEEbSC_:
  812|   446k|        : AST(lr, AST_OBJECT, open_fodder),
  813|   446k|          fields(fields),
  814|   446k|          trailingComma(trailing_comma),
  815|   446k|          closeFodder(close_fodder)
  816|   446k|    {
  817|   446k|        assert(fields.size() > 0 || !trailing_comma);
  ------------------
  |  Branch (817:9): [True: 404k, False: 42.4k]
  |  Branch (817:9): [True: 42.4k, False: 0]
  |  Branch (817:9): [True: 446k, False: 0]
  ------------------
  818|   446k|        if (fields.size() > 0)
  ------------------
  |  Branch (818:13): [True: 404k, False: 42.4k]
  ------------------
  819|       |            assert(trailing_comma || fields[fields.size() - 1].commaFodder.size() == 0);
  ------------------
  |  Branch (819:13): [True: 109k, False: 294k]
  |  Branch (819:13): [True: 294k, False: 0]
  |  Branch (819:13): [True: 404k, False: 0]
  ------------------
  820|   446k|    }
_ZN7jsonnet8internal15DesugaredObject5FieldC2ENS0_11ObjectField4HideEPNS0_3ASTES6_:
  833|  2.15M|            : hide(hide), name(name), body(body)
  834|  2.15M|        {
  835|  2.15M|        }
_ZN7jsonnet8internal15DesugaredObjectC2ERKNS0_13LocationRangeERKNSt3__14listIPNS0_3ASTENS5_9allocatorIS8_EEEERKNS5_6vectorINS1_5FieldENS9_ISF_EEEE:
  841|   441k|        : AST(lr, AST_DESUGARED_OBJECT, Fodder{}), asserts(asserts), fields(fields)
  842|   441k|    {
  843|   441k|    }
_ZN7jsonnet8internal19ObjectComprehensionC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERKNS6_INS0_11ObjectFieldENS8_ISD_EEEEbRKNS6_INS0_17ComprehensionSpecENS8_ISI_EEEESC_:
  856|  35.3k|        : AST(lr, AST_OBJECT_COMPREHENSION, open_fodder),
  857|  35.3k|          fields(fields),
  858|  35.3k|          trailingComma(trailing_comma),
  859|  35.3k|          specs(specs),
  860|  35.3k|          closeFodder(close_fodder)
  861|  35.3k|    {
  862|  35.3k|    }
_ZN7jsonnet8internal25ObjectComprehensionSimpleC2ERKNS0_13LocationRangeEPNS0_3ASTES6_PKNS0_10IdentifierES6_:
  873|  35.1k|        : AST(lr, AST_OBJECT_COMPREHENSION_SIMPLE, Fodder{}),
  874|  35.1k|          field(field),
  875|  35.1k|          value(value),
  876|  35.1k|          id(id),
  877|  35.1k|          array(array)
  878|  35.1k|    {
  879|  35.1k|    }
_ZN7jsonnet8internal6ParensC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_:
  888|   391k|        : AST(lr, AST_PARENS, open_fodder), expr(expr), closeFodder(close_fodder)
  889|   391k|    {
  890|   391k|    }
_ZN7jsonnet8internal4SelfC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEE:
  895|  82.6k|    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|  18.0k|        : AST(lr, AST_SUPER_INDEX, open_fodder),
  911|  18.0k|          dotFodder(dot_fodder),
  912|  18.0k|          index(index),
  913|  18.0k|          idFodder(id_fodder),
  914|  18.0k|          id(id)
  915|  18.0k|    {
  916|  18.0k|    }
_ZN7jsonnet8internal7InSuperC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPNS0_3ASTESC_SC_:
  927|  17.4k|        : AST(lr, AST_IN_SUPER, open_fodder),
  928|  17.4k|          element(element),
  929|  17.4k|          inFodder(in_fodder),
  930|  17.4k|          superFodder(super_fodder)
  931|  17.4k|    {
  932|  17.4k|    }
_ZN7jsonnet8internal5UnaryC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS0_7UnaryOpEPNS0_3ASTE:
  956|   694k|        : AST(lr, AST_UNARY, open_fodder), op(op), expr(expr)
  957|   694k|    {
  958|   694k|    }
_ZN7jsonnet8internal3VarC2ERKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPKNS0_10IdentifierE:
  965|  31.0M|        : AST(lr, AST_VAR, open_fodder), id(id)
  966|  31.0M|    {
  967|  31.0M|    }
_ZN7jsonnet8internal9Allocator14makeIdentifierERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  998|  55.0M|    {
  999|  55.0M|        auto it = internedIdentifiers.find(name);
 1000|  55.0M|        if (it != internedIdentifiers.end()) {
  ------------------
  |  Branch (1000:13): [True: 52.9M, False: 2.18M]
  ------------------
 1001|  52.9M|            return it->second;
 1002|  52.9M|        }
 1003|  2.18M|        auto r = new Identifier(name);
 1004|  2.18M|        internedIdentifiers[name] = r;
 1005|  2.18M|        return r;
 1006|  55.0M|    }
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|   321k|    {
  981|   321k|        auto r = new T(std::forward<Args>(args)...);
  982|   321k|        allocated.push_back(r);
  983|   321k|        return r;
  984|   321k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ErrorEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|   512k|    {
  981|   512k|        auto r = new T(std::forward<Args>(args)...);
  982|   512k|        allocated.push_back(r);
  983|   512k|        return r;
  984|   512k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SF_SG_SF_EEEPT_DpOT0_:
  980|  2.51M|    {
  981|  2.51M|        auto r = new T(std::forward<Args>(args)...);
  982|  2.51M|        allocated.push_back(r);
  983|  2.51M|        return r;
  984|  2.51M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SF_SA_DnEEEPT_DpOT0_:
  980|  31.5k|    {
  981|  31.5k|        auto r = new T(std::forward<Args>(args)...);
  982|  31.5k|        allocated.push_back(r);
  983|  31.5k|        return r;
  984|  31.5k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERSA_RNS6_INS0_8ArgParamENS8_ISE_EEEERbSD_RPNS0_3ASTEEEEPT_DpOT0_:
  980|   157k|    {
  981|   157k|        auto r = new T(std::forward<Args>(args)...);
  982|   157k|        allocated.push_back(r);
  983|   157k|        return r;
  984|   157k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ImportEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  980|    356|    {
  981|    356|        auto r = new T(std::forward<Args>(args)...);
  982|    356|        allocated.push_back(r);
  983|    356|        return r;
  984|    356|    }
_ZN7jsonnet8internal9Allocator4makeINS0_9ImportstrEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  980|  1.17k|    {
  981|  1.17k|        auto r = new T(std::forward<Args>(args)...);
  982|  1.17k|        allocated.push_back(r);
  983|  1.17k|        return r;
  984|  1.17k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_9ImportbinEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_13LiteralStringEEEEPT_DpOT0_:
  980|    593|    {
  981|    593|        auto r = new T(std::forward<Args>(args)...);
  982|    593|        allocated.push_back(r);
  983|    593|        return r;
  984|    593|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS3_4BindENS8_ISD_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|  1.89M|    {
  981|  1.89M|        auto r = new T(std::forward<Args>(args)...);
  982|  1.89M|        allocated.push_back(r);
  983|  1.89M|        return r;
  984|  1.89M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5UnaryEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS0_7UnaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  980|   504k|    {
  981|   504k|        auto r = new T(std::forward<Args>(args)...);
  982|   504k|        allocated.push_back(r);
  983|   504k|        return r;
  984|   504k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ObjectEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS0_11ObjectFieldENS8_ISD_EEEERbRSA_EEEPT_DpOT0_:
  980|   446k|    {
  981|   446k|        auto r = new T(std::forward<Args>(args)...);
  982|   446k|        allocated.push_back(r);
  983|   446k|        return r;
  984|   446k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_19ObjectComprehensionEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS0_11ObjectFieldENS8_ISD_EEEERbRNS6_INS0_17ComprehensionSpecENS8_ISI_EEEERSA_EEEPT_DpOT0_:
  980|  35.3k|    {
  981|  35.3k|        auto r = new T(std::forward<Args>(args)...);
  982|  35.3k|        allocated.push_back(r);
  983|  35.3k|        return r;
  984|  35.3k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS6_12basic_stringIDiNS6_11char_traitsIDiEENS9_IDiEEEENS3_9TokenKindERA1_KcSL_EEEPT_DpOT0_:
  980|  94.3k|    {
  981|  94.3k|        auto r = new T(std::forward<Args>(args)...);
  982|  94.3k|        allocated.push_back(r);
  983|  94.3k|        return r;
  984|  94.3k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS6_12basic_stringIDiNS6_11char_traitsIDiEENS9_IDiEEEENS3_9TokenKindERNSD_IcNSE_IcEENS9_IcEEEESM_EEEPT_DpOT0_:
  980|  1.48k|    {
  981|  1.48k|        auto r = new T(std::forward<Args>(args)...);
  982|  1.48k|        allocated.push_back(r);
  983|  1.48k|        return r;
  984|  1.48k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS6_INS3_7ElementENS8_ISC_EEEEbSB_EEEPT_DpOT0_:
  980|   178k|    {
  981|   178k|        auto r = new T(std::forward<Args>(args)...);
  982|   178k|        allocated.push_back(r);
  983|   178k|        return r;
  984|   178k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_18ArrayComprehensionEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESB_RbRNS6_INS0_17ComprehensionSpecENS8_ISG_EEEESB_EEEPT_DpOT0_:
  980|   250k|    {
  981|   250k|        auto r = new T(std::forward<Args>(args)...);
  982|   250k|        allocated.push_back(r);
  983|   250k|        return r;
  984|   250k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS6_INS3_7ElementENS8_ISC_EEEERbSB_EEEPT_DpOT0_:
  980|   659k|    {
  981|   659k|        auto r = new T(std::forward<Args>(args)...);
  982|   659k|        allocated.push_back(r);
  983|   659k|        return r;
  984|   659k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6ParensEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESB_EEEPT_DpOT0_:
  980|   391k|    {
  981|   391k|        auto r = new T(std::forward<Args>(args)...);
  982|   391k|        allocated.push_back(r);
  983|   391k|        return r;
  984|   391k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERNS5_12basic_stringIcNS5_11char_traitsIcEENS8_IcEEEEEEEPT_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|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS3_9TokenKindERA1_KcSK_EEEPT_DpOT0_:
  980|  3.78M|    {
  981|  3.78M|        auto r = new T(std::forward<Args>(args)...);
  982|  3.78M|        allocated.push_back(r);
  983|  3.78M|        return r;
  984|  3.78M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEENS5_12basic_stringIDiNS5_11char_traitsIDiEENS8_IDiEEEENS3_9TokenKindERNSC_IcNSD_IcEENS8_IcEEEESL_EEEPT_DpOT0_:
  980|  1.50k|    {
  981|  1.50k|        auto r = new T(std::forward<Args>(args)...);
  982|  1.50k|        allocated.push_back(r);
  983|  1.50k|        return r;
  984|  1.50k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_14LiteralBooleanEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEbEEEPT_DpOT0_:
  980|   664k|    {
  981|   664k|        auto r = new T(std::forward<Args>(args)...);
  982|   664k|        allocated.push_back(r);
  983|   664k|        return r;
  984|   664k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11LiteralNullEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_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_6DollarEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_DpOT0_:
  980|  40.0k|    {
  981|  40.0k|        auto r = new T(std::forward<Args>(args)...);
  982|  40.0k|        allocated.push_back(r);
  983|  40.0k|        return r;
  984|  40.0k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  24.3M|    {
  981|  24.3M|        auto r = new T(std::forward<Args>(args)...);
  982|  24.3M|        allocated.push_back(r);
  983|  24.3M|        return r;
  984|  24.3M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_4SelfEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEEEEEPT_DpOT0_:
  980|  55.4k|    {
  981|  55.4k|        auto r = new T(std::forward<Args>(args)...);
  982|  55.4k|        allocated.push_back(r);
  983|  55.4k|        return r;
  984|  55.4k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10SuperIndexEJNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEESB_RPNS0_3ASTESB_RPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|    910|    {
  981|    910|        auto r = new T(std::forward<Args>(args)...);
  982|    910|        allocated.push_back(r);
  983|    910|        return r;
  984|    910|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RbSF_SG_SF_SG_SF_SG_EEEPT_DpOT0_:
  980|  1.41M|    {
  981|  1.41M|        auto r = new T(std::forward<Args>(args)...);
  982|  1.41M|        allocated.push_back(r);
  983|  1.41M|        return r;
  984|  1.41M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SG_RPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  5.61M|    {
  981|  5.61M|        auto r = new T(std::forward<Args>(args)...);
  982|  5.61M|        allocated.push_back(r);
  983|  5.61M|        return r;
  984|  5.61M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RNS6_INS0_8ArgParamENS8_ISH_EEEERbSG_SG_SL_EEEPT_DpOT0_:
  980|  6.34M|    {
  981|  6.34M|        auto r = new T(std::forward<Args>(args)...);
  982|  6.34M|        allocated.push_back(r);
  983|  6.34M|        return r;
  984|  6.34M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10ApplyBraceEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTESF_EEEPT_DpOT0_:
  980|   103k|    {
  981|   103k|        auto r = new T(std::forward<Args>(args)...);
  982|   103k|        allocated.push_back(r);
  983|   103k|        return r;
  984|   103k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_7InSuperEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_SG_EEEPT_DpOT0_:
  980|    301|    {
  981|    301|        auto r = new T(std::forward<Args>(args)...);
  982|    301|        allocated.push_back(r);
  983|    301|        return r;
  984|    301|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS5_9allocatorIS7_EEEERPNS0_3ASTERSA_RNS0_8BinaryOpESF_EEEPT_DpOT0_:
  980|  6.77M|    {
  981|  6.77M|        auto r = new T(std::forward<Args>(args)...);
  982|  6.77M|        allocated.push_back(r);
  983|  6.77M|        return r;
  984|  6.77M|    }
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|   481k|    {
  989|   481k|        auto r = new T(*ast);
  990|   481k|        allocated.push_back(r);
  991|   481k|        return r;
  992|   481k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5ArrayEEEPT_S5_:
  988|   210k|    {
  989|   210k|        auto r = new T(*ast);
  990|   210k|        allocated.push_back(r);
  991|   210k|        return r;
  992|   210k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_6BinaryEEEPT_S5_:
  988|  1.17M|    {
  989|  1.17M|        auto r = new T(*ast);
  990|  1.17M|        allocated.push_back(r);
  991|  1.17M|        return r;
  992|  1.17M|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_11ConditionalEEEPT_S5_:
  988|   505k|    {
  989|   505k|        auto r = new T(*ast);
  990|   505k|        allocated.push_back(r);
  991|   505k|        return r;
  992|   505k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_15DesugaredObjectEEEPT_S5_:
  988|   948k|    {
  989|   948k|        auto r = new T(*ast);
  990|   948k|        allocated.push_back(r);
  991|   948k|        return r;
  992|   948k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5ErrorEEEPT_S5_:
  988|   128k|    {
  989|   128k|        auto r = new T(*ast);
  990|   128k|        allocated.push_back(r);
  991|   128k|        return r;
  992|   128k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_8FunctionEEEPT_S5_:
  988|   254k|    {
  989|   254k|        auto r = new T(*ast);
  990|   254k|        allocated.push_back(r);
  991|   254k|        return r;
  992|   254k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_6ImportEEEPT_S5_:
  988|    575|    {
  989|    575|        auto r = new T(*ast);
  990|    575|        allocated.push_back(r);
  991|    575|        return r;
  992|    575|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_9ImportstrEEEPT_S5_:
  988|  3.98k|    {
  989|  3.98k|        auto r = new T(*ast);
  990|  3.98k|        allocated.push_back(r);
  991|  3.98k|        return r;
  992|  3.98k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_9ImportbinEEEPT_S5_:
  988|    832|    {
  989|    832|        auto r = new T(*ast);
  990|    832|        allocated.push_back(r);
  991|    832|        return r;
  992|    832|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5IndexEEEPT_S5_:
  988|   555k|    {
  989|   555k|        auto r = new T(*ast);
  990|   555k|        allocated.push_back(r);
  991|   555k|        return r;
  992|   555k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_7InSuperEEEPT_S5_:
  988|   200k|    {
  989|   200k|        auto r = new T(*ast);
  990|   200k|        allocated.push_back(r);
  991|   200k|        return r;
  992|   200k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_14LiteralBooleanEEEPT_S5_:
  988|  23.0k|    {
  989|  23.0k|        auto r = new T(*ast);
  990|  23.0k|        allocated.push_back(r);
  991|  23.0k|        return r;
  992|  23.0k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_11LiteralNullEEEPT_S5_:
  988|  19.4k|    {
  989|  19.4k|        auto r = new T(*ast);
  990|  19.4k|        allocated.push_back(r);
  991|  19.4k|        return r;
  992|  19.4k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_13LiteralNumberEEEPT_S5_:
  988|   902k|    {
  989|   902k|        auto r = new T(*ast);
  990|   902k|        allocated.push_back(r);
  991|   902k|        return r;
  992|   902k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_13LiteralStringEEEPT_S5_:
  988|  1.98M|    {
  989|  1.98M|        auto r = new T(*ast);
  990|  1.98M|        allocated.push_back(r);
  991|  1.98M|        return r;
  992|  1.98M|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5LocalEEEPT_S5_:
  988|   317k|    {
  989|   317k|        auto r = new T(*ast);
  990|   317k|        allocated.push_back(r);
  991|   317k|        return r;
  992|   317k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_25ObjectComprehensionSimpleEEEPT_S5_:
  988|  48.5k|    {
  989|  48.5k|        auto r = new T(*ast);
  990|  48.5k|        allocated.push_back(r);
  991|  48.5k|        return r;
  992|  48.5k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_4SelfEEEPT_S5_:
  988|  11.4k|    {
  989|  11.4k|        auto r = new T(*ast);
  990|  11.4k|        allocated.push_back(r);
  991|  11.4k|        return r;
  992|  11.4k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_10SuperIndexEEEPT_S5_:
  988|   201k|    {
  989|   201k|        auto r = new T(*ast);
  990|   201k|        allocated.push_back(r);
  991|   201k|        return r;
  992|   201k|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_5UnaryEEEPT_S5_:
  988|  1.85M|    {
  989|  1.85M|        auto r = new T(*ast);
  990|  1.85M|        allocated.push_back(r);
  991|  1.85M|        return r;
  992|  1.85M|    }
_ZN7jsonnet8internal9Allocator5cloneINS0_3VarEEEPT_S5_:
  988|  2.66M|    {
  989|  2.66M|        auto r = new T(*ast);
  990|  2.66M|        allocated.push_back(r);
  991|  2.66M|        return r;
  992|  2.66M|    }
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|  3.57k|    {
  981|  3.57k|        auto r = new T(std::forward<Args>(args)...);
  982|  3.57k|        allocated.push_back(r);
  983|  3.57k|        return r;
  984|  3.57k|    }
vm.cpp:_ZN7jsonnet8internalL10bop_stringENS0_8BinaryOpE:
  325|    185|{
  326|    185|    switch (bop) {
  327|      8|        case BOP_MULT: return "*";
  ------------------
  |  Branch (327:9): [True: 8, False: 177]
  ------------------
  328|      4|        case BOP_DIV: return "/";
  ------------------
  |  Branch (328:9): [True: 4, False: 181]
  ------------------
  329|      0|        case BOP_PERCENT: return "%";
  ------------------
  |  Branch (329:9): [True: 0, False: 185]
  ------------------
  330|       |
  331|     54|        case BOP_PLUS: return "+";
  ------------------
  |  Branch (331:9): [True: 54, False: 131]
  ------------------
  332|      9|        case BOP_MINUS: return "-";
  ------------------
  |  Branch (332:9): [True: 9, False: 176]
  ------------------
  333|       |
  334|      6|        case BOP_SHIFT_L: return "<<";
  ------------------
  |  Branch (334:9): [True: 6, False: 179]
  ------------------
  335|      1|        case BOP_SHIFT_R: return ">>";
  ------------------
  |  Branch (335:9): [True: 1, False: 184]
  ------------------
  336|       |
  337|     18|        case BOP_GREATER: return ">";
  ------------------
  |  Branch (337:9): [True: 18, False: 167]
  ------------------
  338|     16|        case BOP_GREATER_EQ: return ">=";
  ------------------
  |  Branch (338:9): [True: 16, False: 169]
  ------------------
  339|     19|        case BOP_LESS: return "<";
  ------------------
  |  Branch (339:9): [True: 19, False: 166]
  ------------------
  340|     10|        case BOP_LESS_EQ: return "<=";
  ------------------
  |  Branch (340:9): [True: 10, False: 175]
  ------------------
  341|      0|        case BOP_IN: return "in";
  ------------------
  |  Branch (341:9): [True: 0, False: 185]
  ------------------
  342|       |
  343|      0|        case BOP_MANIFEST_EQUAL: return "==";
  ------------------
  |  Branch (343:9): [True: 0, False: 185]
  ------------------
  344|      0|        case BOP_MANIFEST_UNEQUAL: return "!=";
  ------------------
  |  Branch (344:9): [True: 0, False: 185]
  ------------------
  345|       |
  346|     13|        case BOP_BITWISE_AND: return "&";
  ------------------
  |  Branch (346:9): [True: 13, False: 172]
  ------------------
  347|     16|        case BOP_BITWISE_XOR: return "^";
  ------------------
  |  Branch (347:9): [True: 16, False: 169]
  ------------------
  348|      6|        case BOP_BITWISE_OR: return "|";
  ------------------
  |  Branch (348:9): [True: 6, False: 179]
  ------------------
  349|       |
  350|      1|        case BOP_AND: return "&&";
  ------------------
  |  Branch (350:9): [True: 1, False: 184]
  ------------------
  351|      4|        case BOP_OR: return "||";
  ------------------
  |  Branch (351:9): [True: 4, False: 181]
  ------------------
  352|       |
  353|      0|        default:
  ------------------
  |  Branch (353:9): [True: 0, False: 185]
  ------------------
  354|      0|            std::cerr << "INTERNAL ERROR: Unrecognised binary operator: " << bop << std::endl;
  355|      0|            std::abort();
  356|    185|    }
  357|    185|}
vm.cpp:_ZN7jsonnet8internalL10uop_stringENS0_7UnaryOpE:
  938|    139|{
  939|    139|    switch (uop) {
  940|     93|        case UOP_PLUS: return "+";
  ------------------
  |  Branch (940:9): [True: 93, False: 46]
  ------------------
  941|     13|        case UOP_MINUS: return "-";
  ------------------
  |  Branch (941:9): [True: 13, False: 126]
  ------------------
  942|      4|        case UOP_BITWISE_NOT: return "~";
  ------------------
  |  Branch (942:9): [True: 4, False: 135]
  ------------------
  943|     29|        case UOP_NOT: return "!";
  ------------------
  |  Branch (943:9): [True: 29, False: 110]
  ------------------
  944|       |
  945|      0|        default:
  ------------------
  |  Branch (945:9): [True: 0, False: 139]
  ------------------
  946|      0|            std::cerr << "INTERNAL ERROR: Unrecognised unary operator: " << uop << std::endl;
  947|      0|            std::abort();
  948|    139|    }
  949|    139|}
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|   101k|    {
  981|   101k|        auto r = new T(std::forward<Args>(args)...);
  982|   101k|        allocated.push_back(r);
  983|   101k|        return r;
  984|   101k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERA4_KcEEEPT_DpOT0_:
  980|   606k|    {
  981|   606k|        auto r = new T(std::forward<Args>(args)...);
  982|   606k|        allocated.push_back(r);
  983|   606k|        return r;
  984|   606k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  980|   285k|    {
  981|   285k|        auto r = new T(std::forward<Args>(args)...);
  982|   285k|        allocated.push_back(r);
  983|   285k|        return r;
  984|   285k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  980|   441k|    {
  981|   441k|        auto r = new T(std::forward<Args>(args)...);
  982|   441k|        allocated.push_back(r);
  983|   441k|        return r;
  984|   441k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ArrayEEEEPT_DpOT0_:
  980|   285k|    {
  981|   285k|        auto r = new T(std::forward<Args>(args)...);
  982|   285k|        allocated.push_back(r);
  983|   285k|        return r;
  984|   285k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  980|   285k|    {
  981|   285k|        auto r = new T(std::forward<Args>(args)...);
  982|   285k|        allocated.push_back(r);
  983|   285k|        return r;
  984|   285k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  980|   466k|    {
  981|   466k|        auto r = new T(std::forward<Args>(args)...);
  982|   466k|        allocated.push_back(r);
  983|   466k|        return r;
  984|   466k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERKPNS0_3ASTESD_RSF_SD_SI_EEEPT_DpOT0_:
  980|   130k|    {
  981|   130k|        auto r = new T(std::forward<Args>(args)...);
  982|   130k|        allocated.push_back(r);
  983|   130k|        return r;
  984|   130k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  980|   310k|    {
  981|   310k|        auto r = new T(std::forward<Args>(args)...);
  982|   310k|        allocated.push_back(r);
  983|   310k|        return r;
  984|   310k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_NS7_INS0_8ArgParamENS9_ISE_EEEEbSD_PNS0_11ConditionalEEEEPT_DpOT0_:
  980|   310k|    {
  981|   310k|        auto r = new T(std::forward<Args>(args)...);
  982|   310k|        allocated.push_back(r);
  983|   310k|        return r;
  984|   310k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_6BinaryESD_RPNS0_3ASTESD_PNS0_5LocalEEEEPT_DpOT0_:
  980|   310k|    {
  981|   310k|        auto r = new T(std::forward<Args>(args)...);
  982|   310k|        allocated.push_back(r);
  983|   310k|        return r;
  984|   310k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ApplyEEEEPT_DpOT0_:
  980|   310k|    {
  981|   310k|        auto r = new T(std::forward<Args>(args)...);
  982|   310k|        allocated.push_back(r);
  983|   310k|        return r;
  984|   310k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|   319k|    {
  981|   319k|        auto r = new T(std::forward<Args>(args)...);
  982|   319k|        allocated.push_back(r);
  983|   319k|        return r;
  984|   319k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bSG_SE_DnSE_DnSE_EEEPT_DpOT0_:
  980|   310k|    {
  981|   310k|        auto r = new T(std::forward<Args>(args)...);
  982|   310k|        allocated.push_back(r);
  983|   310k|        return r;
  984|   310k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ApplyESD_SF_SD_PNS0_5ErrorEEEEPT_DpOT0_:
  980|   310k|    {
  981|   310k|        auto r = new T(std::forward<Args>(args)...);
  982|   310k|        allocated.push_back(r);
  983|   310k|        return r;
  984|   310k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS8_INS3_7ElementENSA_ISF_EEEEbSE_EEEPT_DpOT0_:
  980|   285k|    {
  981|   285k|        auto r = new T(std::forward<Args>(args)...);
  982|   285k|        allocated.push_back(r);
  983|   285k|        return r;
  984|   285k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralStringEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERKNS7_12basic_stringIDiNS7_11char_traitsIDiEENSA_IDiEEEENS3_9TokenKindERA1_KcSP_EEEPT_DpOT0_:
  980|  11.1M|    {
  981|  11.1M|        auto r = new T(std::forward<Args>(args)...);
  982|  11.1M|        allocated.push_back(r);
  983|  11.1M|        return r;
  984|  11.1M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ErrorEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|   728k|    {
  981|   728k|        auto r = new T(std::forward<Args>(args)...);
  982|   728k|        allocated.push_back(r);
  983|   728k|        return r;
  984|   728k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_SF_SH_SF_EEEPT_DpOT0_:
  980|   321k|    {
  981|   321k|        auto r = new T(std::forward<Args>(args)...);
  982|   321k|        allocated.push_back(r);
  983|   321k|        return r;
  984|   321k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralStringESE_DnSE_DnSE_EEEPT_DpOT0_:
  980|  2.74M|    {
  981|  2.74M|        auto r = new T(std::forward<Args>(args)...);
  982|  2.74M|        allocated.push_back(r);
  983|  2.74M|        return r;
  984|  2.74M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_RNS7_INS0_8ArgParamENS9_ISI_EEEEbSH_SH_bEEEPT_DpOT0_:
  980|   242k|    {
  981|   242k|        auto r = new T(std::forward<Args>(args)...);
  982|   242k|        allocated.push_back(r);
  983|   242k|        return r;
  984|   242k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5IndexESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  980|  1.73M|    {
  981|  1.73M|        auto r = new T(std::forward<Args>(args)...);
  982|  1.73M|        allocated.push_back(r);
  983|  1.73M|        return r;
  984|  1.73M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5UnaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS0_7UnaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  980|   189k|    {
  981|   189k|        auto r = new T(std::forward<Args>(args)...);
  982|   189k|        allocated.push_back(r);
  983|   189k|        return r;
  984|   189k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11LiteralNullEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  980|   264k|    {
  981|   264k|        auto r = new T(std::forward<Args>(args)...);
  982|   264k|        allocated.push_back(r);
  983|   264k|        return r;
  984|   264k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  6.39M|    {
  981|  6.39M|        auto r = new T(std::forward<Args>(args)...);
  982|  6.39M|        allocated.push_back(r);
  983|  6.39M|        return r;
  984|  6.39M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5IndexESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  980|   769k|    {
  981|   769k|        auto r = new T(std::forward<Args>(args)...);
  982|   769k|        allocated.push_back(r);
  983|   769k|        return r;
  984|   769k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESC_RNS7_INS0_8ArgParamENS9_ISD_EEEEbSC_RPNS0_3ASTEEEEPT_DpOT0_:
  980|   578k|    {
  981|   578k|        auto r = new T(std::forward<Args>(args)...);
  982|   578k|        allocated.push_back(r);
  983|   578k|        return r;
  984|   578k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_4SelfEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  980|  27.2k|    {
  981|  27.2k|        auto r = new T(std::forward<Args>(args)...);
  982|  27.2k|        allocated.push_back(r);
  983|  27.2k|        return r;
  984|  27.2k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_PNS0_14LiteralBooleanESD_PNS0_5ErrorEEEEPT_DpOT0_:
  980|  97.0k|    {
  981|  97.0k|        auto r = new T(std::forward<Args>(args)...);
  982|  97.0k|        allocated.push_back(r);
  983|  97.0k|        return r;
  984|  97.0k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_14LiteralBooleanEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEbEEEPT_DpOT0_:
  980|  97.0k|    {
  981|  97.0k|        auto r = new T(std::forward<Args>(args)...);
  982|  97.0k|        allocated.push_back(r);
  983|  97.0k|        return r;
  984|  97.0k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERSB_RNS7_INS0_8ArgParamENS9_ISF_EEEERbSE_RPNS0_3ASTEEEEPT_DpOT0_:
  980|   989k|    {
  981|   989k|        auto r = new T(std::forward<Args>(args)...);
  982|   989k|        allocated.push_back(r);
  983|   989k|        return r;
  984|   989k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|   226k|    {
  981|   226k|        auto r = new T(std::forward<Args>(args)...);
  982|   226k|        allocated.push_back(r);
  983|   226k|        return r;
  984|   226k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_7InSuperESD_PNS0_6BinaryESD_PNS0_3ASTEEEEPT_DpOT0_:
  980|  17.1k|    {
  981|  17.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  17.1k|        allocated.push_back(r);
  983|  17.1k|        return r;
  984|  17.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_7InSuperEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_SD_EEEPT_DpOT0_:
  980|  17.1k|    {
  981|  17.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  17.1k|        allocated.push_back(r);
  983|  17.1k|        return r;
  984|  17.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_6BinaryEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_10SuperIndexESD_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  980|  17.1k|    {
  981|  17.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  17.1k|        allocated.push_back(r);
  983|  17.1k|        return r;
  984|  17.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_10SuperIndexEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_PNS0_3ASTESD_DnEEEPT_DpOT0_:
  980|  17.1k|    {
  981|  17.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  17.1k|        allocated.push_back(r);
  983|  17.1k|        return r;
  984|  17.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_15DesugaredObjectEJRNS0_13LocationRangeERNSt3__14listIPNS0_3ASTENS6_9allocatorIS9_EEEERNS6_6vectorINS3_5FieldENSA_ISF_EEEEEEEPT_DpOT0_:
  980|   441k|    {
  981|   441k|        auto r = new T(std::forward<Args>(args)...);
  982|   441k|        allocated.push_back(r);
  983|   441k|        return r;
  984|   441k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  980|  1.13M|    {
  981|  1.13M|        auto r = new T(std::forward<Args>(args)...);
  982|  1.13M|        allocated.push_back(r);
  983|  1.13M|        return r;
  984|  1.13M|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralNumberESE_DnSE_DnSE_EEEPT_DpOT0_:
  980|  36.2k|    {
  981|  36.2k|        auto r = new T(std::forward<Args>(args)...);
  982|  36.2k|        allocated.push_back(r);
  983|  36.2k|        return r;
  984|  36.2k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS7_12basic_stringIcNS7_11char_traitsIcEENSA_IcEEEEEEEPT_DpOT0_:
  980|  36.2k|    {
  981|  36.2k|        auto r = new T(std::forward<Args>(args)...);
  982|  36.2k|        allocated.push_back(r);
  983|  36.2k|        return r;
  984|  36.2k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_18ArrayComprehensionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ArrayESD_bRNS7_INS0_17ComprehensionSpecENS9_ISG_EEEESD_EEEPT_DpOT0_:
  980|  35.1k|    {
  981|  35.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  35.1k|        allocated.push_back(r);
  983|  35.1k|        return r;
  984|  35.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  980|  35.1k|    {
  981|  35.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  35.1k|        allocated.push_back(r);
  983|  35.1k|        return r;
  984|  35.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_25ObjectComprehensionSimpleEJRNS0_13LocationRangeEPNS0_5IndexEPNS0_5LocalERPKNS0_10IdentifierERPNS0_3ASTEEEEPT_DpOT0_:
  980|  35.1k|    {
  981|  35.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  35.1k|        allocated.push_back(r);
  983|  35.1k|        return r;
  984|  35.1k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bRPNS0_3ASTESE_DnSE_DnSE_EEEPT_DpOT0_:
  980|  35.1k|    {
  981|  35.1k|        auto r = new T(std::forward<Args>(args)...);
  982|  35.1k|        allocated.push_back(r);
  983|  35.1k|        return r;
  984|  35.1k|    }
_ZN7jsonnet8internal9Allocator15makeBuiltinBodyIZNS0_9Desugarer9stdlibASTENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEUlvE_EEPKNS0_19BuiltinFunctionBodyERKNS0_13LocationRangeERKSA_OT_:
 1009|   328k|    {
 1010|   328k|        auto it = internedBuiltins.find(name);
 1011|   328k|        if (it != internedBuiltins.end()) {
  ------------------
  |  Branch (1011:13): [True: 150k, False: 178k]
  ------------------
 1012|   150k|            return it->second;
 1013|   150k|        }
 1014|   178k|        const Identifiers params = make_params();
 1015|   178k|        auto r = new BuiltinFunctionBody(loc, name, params);
 1016|   178k|        internedBuiltins[name] = r;
 1017|   178k|        return r;
 1018|   328k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_15BuiltinFunctionEJRKNS0_13LocationRangeERPKNS0_19BuiltinFunctionBodyEEEEPT_DpOT0_:
  980|   328k|    {
  981|   328k|        auto r = new T(std::forward<Args>(args)...);
  982|   328k|        allocated.push_back(r);
  983|   328k|        return r;
  984|   328k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5LocalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISD_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  980|  4.24k|    {
  981|  4.24k|        auto r = new T(std::forward<Args>(args)...);
  982|  4.24k|        allocated.push_back(r);
  983|  4.24k|        return r;
  984|  4.24k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_11ConditionalEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5ApplyERKSC_SF_SD_PNS0_3VarEEEEPT_DpOT0_:
  980|  4.24k|    {
  981|  4.24k|        auto r = new T(std::forward<Args>(args)...);
  982|  4.24k|        allocated.push_back(r);
  983|  4.24k|        return r;
  984|  4.24k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_RNS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  980|  4.24k|    {
  981|  4.24k|        auto r = new T(std::forward<Args>(args)...);
  982|  4.24k|        allocated.push_back(r);
  983|  4.24k|        return r;
  984|  4.24k|    }
_ZN7jsonnet8internal9Allocator4makeINS0_3VarEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  980|  8.48k|    {
  981|  8.48k|        auto r = new T(std::forward<Args>(args)...);
  982|  8.48k|        allocated.push_back(r);
  983|  8.48k|        return r;
  984|  8.48k|    }
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|   328k|{
   42|   328k|    switch (builtin) {
   43|  7.81k|        case 0: return {U"makeArray", {U"sz", U"func"}};
  ------------------
  |  Branch (43:9): [True: 7.81k, False: 320k]
  ------------------
   44|  7.81k|        case 1: return {U"pow", {U"x", U"n"}};
  ------------------
  |  Branch (44:9): [True: 7.81k, False: 320k]
  ------------------
   45|  7.81k|        case 2: return {U"floor", {U"x"}};
  ------------------
  |  Branch (45:9): [True: 7.81k, False: 320k]
  ------------------
   46|  7.81k|        case 3: return {U"ceil", {U"x"}};
  ------------------
  |  Branch (46:9): [True: 7.81k, False: 320k]
  ------------------
   47|  7.81k|        case 4: return {U"sqrt", {U"x"}};
  ------------------
  |  Branch (47:9): [True: 7.81k, False: 320k]
  ------------------
   48|  7.81k|        case 5: return {U"sin", {U"x"}};
  ------------------
  |  Branch (48:9): [True: 7.81k, False: 320k]
  ------------------
   49|  7.81k|        case 6: return {U"cos", {U"x"}};
  ------------------
  |  Branch (49:9): [True: 7.81k, False: 320k]
  ------------------
   50|  7.81k|        case 7: return {U"tan", {U"x"}};
  ------------------
  |  Branch (50:9): [True: 7.81k, False: 320k]
  ------------------
   51|  7.81k|        case 8: return {U"asin", {U"x"}};
  ------------------
  |  Branch (51:9): [True: 7.81k, False: 320k]
  ------------------
   52|  7.81k|        case 9: return {U"acos", {U"x"}};
  ------------------
  |  Branch (52:9): [True: 7.81k, False: 320k]
  ------------------
   53|  7.81k|        case 10: return {U"atan", {U"x"}};
  ------------------
  |  Branch (53:9): [True: 7.81k, False: 320k]
  ------------------
   54|  7.81k|        case 11: return {U"type", {U"x"}};
  ------------------
  |  Branch (54:9): [True: 7.81k, False: 320k]
  ------------------
   55|  7.81k|        case 12: return {U"filter", {U"func", U"arr"}};
  ------------------
  |  Branch (55:9): [True: 7.81k, False: 320k]
  ------------------
   56|  7.81k|        case 13: return {U"objectHasEx", {U"obj", U"f", U"inc_hidden"}};
  ------------------
  |  Branch (56:9): [True: 7.81k, False: 320k]
  ------------------
   57|  7.81k|        case 14: return {U"length", {U"x"}};
  ------------------
  |  Branch (57:9): [True: 7.81k, False: 320k]
  ------------------
   58|  7.81k|        case 15: return {U"objectFieldsEx", {U"obj", U"inc_hidden"}};
  ------------------
  |  Branch (58:9): [True: 7.81k, False: 320k]
  ------------------
   59|  7.81k|        case 16: return {U"codepoint", {U"str"}};
  ------------------
  |  Branch (59:9): [True: 7.81k, False: 320k]
  ------------------
   60|  7.81k|        case 17: return {U"char", {U"n"}};
  ------------------
  |  Branch (60:9): [True: 7.81k, False: 320k]
  ------------------
   61|  7.81k|        case 18: return {U"log", {U"n"}};
  ------------------
  |  Branch (61:9): [True: 7.81k, False: 320k]
  ------------------
   62|  7.81k|        case 19: return {U"exp", {U"n"}};
  ------------------
  |  Branch (62:9): [True: 7.81k, False: 320k]
  ------------------
   63|  7.81k|        case 20: return {U"mantissa", {U"n"}};
  ------------------
  |  Branch (63:9): [True: 7.81k, False: 320k]
  ------------------
   64|  7.81k|        case 21: return {U"exponent", {U"n"}};
  ------------------
  |  Branch (64:9): [True: 7.81k, False: 320k]
  ------------------
   65|  7.81k|        case 22: return {U"modulo", {U"a", U"b"}};
  ------------------
  |  Branch (65:9): [True: 7.81k, False: 320k]
  ------------------
   66|  7.81k|        case 23: return {U"extVar", {U"x"}};
  ------------------
  |  Branch (66:9): [True: 7.81k, False: 320k]
  ------------------
   67|  7.81k|        case 24: return {U"primitiveEquals", {U"a", U"b"}};
  ------------------
  |  Branch (67:9): [True: 7.81k, False: 320k]
  ------------------
   68|  7.81k|        case 25: return {U"native", {U"name"}};
  ------------------
  |  Branch (68:9): [True: 7.81k, False: 320k]
  ------------------
   69|  7.81k|        case 26: return {U"md5", {U"str"}};
  ------------------
  |  Branch (69:9): [True: 7.81k, False: 320k]
  ------------------
   70|  7.81k|        case 27: return {U"trace", {U"str", U"rest"}};
  ------------------
  |  Branch (70:9): [True: 7.81k, False: 320k]
  ------------------
   71|  7.81k|        case 28: return {U"splitLimit", {U"str", U"c", U"maxsplits"}};
  ------------------
  |  Branch (71:9): [True: 7.81k, False: 320k]
  ------------------
   72|  7.81k|        case 29: return {U"substr", {U"str", U"from", U"len"}};
  ------------------
  |  Branch (72:9): [True: 7.81k, False: 320k]
  ------------------
   73|  7.81k|        case 30: return {U"range", {U"from", U"to"}};
  ------------------
  |  Branch (73:9): [True: 7.81k, False: 320k]
  ------------------
   74|  7.81k|        case 31: return {U"strReplace", {U"str", U"from", U"to"}};
  ------------------
  |  Branch (74:9): [True: 7.81k, False: 320k]
  ------------------
   75|  7.81k|        case 32: return {U"asciiLower", {U"str"}};
  ------------------
  |  Branch (75:9): [True: 7.81k, False: 320k]
  ------------------
   76|  7.81k|        case 33: return {U"asciiUpper", {U"str"}};
  ------------------
  |  Branch (76:9): [True: 7.81k, False: 320k]
  ------------------
   77|  7.81k|        case 34: return {U"join", {U"sep", U"arr"}};
  ------------------
  |  Branch (77:9): [True: 7.81k, False: 320k]
  ------------------
   78|  7.81k|        case 35: return {U"parseJson", {U"str"}};
  ------------------
  |  Branch (78:9): [True: 7.81k, False: 320k]
  ------------------
   79|  7.81k|        case 36: return {U"parseYaml", {U"str"}};
  ------------------
  |  Branch (79:9): [True: 7.81k, False: 320k]
  ------------------
   80|  7.81k|        case 37: return {U"encodeUTF8", {U"str"}};
  ------------------
  |  Branch (80:9): [True: 7.81k, False: 320k]
  ------------------
   81|  7.81k|        case 38: return {U"decodeUTF8", {U"arr"}};
  ------------------
  |  Branch (81:9): [True: 7.81k, False: 320k]
  ------------------
   82|  7.81k|        case 39: return {U"atan2", {U"y", U"x"}};
  ------------------
  |  Branch (82:9): [True: 7.81k, False: 320k]
  ------------------
   83|  7.81k|        case 40: return {U"hypot", {U"a", U"b"}};
  ------------------
  |  Branch (83:9): [True: 7.81k, False: 320k]
  ------------------
   84|  7.81k|        case 41: return {U"objectRemoveKey", {U"obj", U"key"}};
  ------------------
  |  Branch (84:9): [True: 7.81k, False: 320k]
  ------------------
   85|      0|        default:
  ------------------
  |  Branch (85:9): [True: 0, False: 328k]
  ------------------
   86|      0|            std::cerr << "INTERNAL ERROR: Unrecognized builtin function: " << builtin << std::endl;
   87|      0|            std::abort();
   88|   328k|    }
   89|       |    // Quiet, compiler.
   90|      0|    return BuiltinDecl();
   91|   328k|}
_ZN7jsonnet8internal13makeStdlibASTEPNS0_9AllocatorENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1022|  3.57k|DesugaredObject *makeStdlibAST(Allocator *alloc, std::string filename) {
 1023|  3.57k|    Desugarer desugarer(alloc, true);
 1024|  3.57k|    return desugarer.stdlibAST(filename);
 1025|  3.57k|}
_ZN7jsonnet8internal15jsonnet_desugarEPNS0_9AllocatorERPNS0_3ASTEPNSt3__13mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS0_5VmExtENS6_4lessISD_EENSB_INS6_4pairIKSD_SE_EEEEEE:
 1028|  4.66k|{
 1029|  4.66k|    Desugarer desugarer(alloc);
 1030|  4.66k|    desugarer.desugarFile(ast, tlas);
 1031|  4.66k|}
_ZN7jsonnet8internal9DesugarerC2EPNS0_9AllocatorEb:
  229|  8.24k|    Desugarer(Allocator *alloc, bool isStdlib = false) : alloc(alloc), isStdlib(isStdlib) {}
_ZN7jsonnet8internal9Desugarer9stdlibASTENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  921|  7.81k|    DesugaredObject *stdlibAST(std::string filename) {
  922|       |        // Now, implement the std library by wrapping in a local construct.
  923|  7.81k|        Tokens tokens = jsonnet_lex("std.jsonnet", STD_CODE);
  924|  7.81k|        AST *std_ast = jsonnet_parse(alloc, tokens);
  925|  7.81k|        desugar(std_ast, 0);
  926|  7.81k|        auto *std_obj = dynamic_cast<DesugaredObject *>(std_ast);
  927|  7.81k|        if (std_obj == nullptr) {
  ------------------
  |  Branch (927:13): [True: 0, False: 7.81k]
  ------------------
  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|  7.81k|        DesugaredObject::Fields &fields = std_obj->fields;
  934|   336k|        for (unsigned long c = 0; c <= max_builtin; ++c) {
  ------------------
  |  Branch (934:35): [True: 328k, False: 7.81k]
  ------------------
  935|   328k|            const auto &decl = jsonnet_builtin_decl(c);
  936|   328k|            auto name = str(decl.name);
  937|   328k|            auto name_utf8 = "std:" + encode_utf8(decl.name);
  938|   328k|            auto fnbody = alloc->makeBuiltinBody(E, name_utf8, [this, &decl]()->Identifiers {
  939|   328k|                Identifiers params;
  940|   328k|                for (const auto &p : decl.params)
  941|   328k|                    params.push_back(this->id(p));
  942|   328k|                return params;
  943|   328k|            });
  944|   328k|            auto field = std::find_if(fields.begin(), fields.end(),
  945|   328k|                [=](const DesugaredObject::Field& f) {
  946|   328k|                    return static_cast<LiteralString*>(f.name)->value == decl.name;
  947|   328k|                });
  948|   328k|            auto fn = make<BuiltinFunction>(E, fnbody);
  949|   328k|            if (field != fields.end()) {
  ------------------
  |  Branch (949:17): [True: 54.7k, False: 273k]
  ------------------
  950|  54.7k|                field->body = fn;
  951|   273k|            } else {
  952|   273k|                fields.emplace_back(ObjectField::HIDDEN, name, fn);
  953|   273k|            }
  954|   328k|        }
  955|  7.81k|        fields.emplace_back(
  956|  7.81k|            ObjectField::HIDDEN, str(U"thisFile"), str(decode_utf8(filename)));
  957|  7.81k|        return std_obj;
  958|  7.81k|    }
_ZN7jsonnet8internal9Desugarer7desugarERPNS0_3ASTEj:
  686|  66.8M|    {
  687|  66.8M|        if (auto *ast = dynamic_cast<Apply *>(ast_)) {
  ------------------
  |  Branch (687:19): [True: 6.40M, False: 60.4M]
  ------------------
  688|  6.40M|            desugar(ast->target, obj_level);
  689|  6.40M|            for (ArgParam &arg : ast->args)
  ------------------
  |  Branch (689:32): [True: 10.5M, False: 6.40M]
  ------------------
  690|  10.5M|                desugar(arg.expr, obj_level);
  691|       |
  692|  60.4M|        } else if (auto *ast = dynamic_cast<ApplyBrace *>(ast_)) {
  ------------------
  |  Branch (692:26): [True: 101k, False: 60.3M]
  ------------------
  693|   101k|            desugar(ast->left, obj_level);
  694|   101k|            desugar(ast->right, obj_level);
  695|   101k|            ast_ =
  696|   101k|                make<Binary>(ast->location, ast->openFodder, ast->left, EF, BOP_PLUS, ast->right);
  697|       |
  698|  60.3M|        } else if (auto *ast = dynamic_cast<Array *>(ast_)) {
  ------------------
  |  Branch (698:26): [True: 906k, False: 59.4M]
  ------------------
  699|   906k|            for (auto &el : ast->elements)
  ------------------
  |  Branch (699:27): [True: 2.82M, False: 906k]
  ------------------
  700|  2.82M|                desugar(el.expr, obj_level);
  701|       |
  702|  59.4M|        } else if (auto *ast = dynamic_cast<ArrayComprehension *>(ast_)) {
  ------------------
  |  Branch (702:26): [True: 285k, False: 59.1M]
  ------------------
  703|   285k|            for (ComprehensionSpec &spec : ast->specs)
  ------------------
  |  Branch (703:42): [True: 441k, False: 285k]
  ------------------
  704|   441k|                desugar(spec.expr, obj_level);
  705|   285k|            desugar(ast->body, obj_level + 1);
  706|       |
  707|   285k|            ast_ = makeArrayComprehension(ast);
  708|       |
  709|  59.1M|        } else if (auto *ast = dynamic_cast<Assert *>(ast_)) {
  ------------------
  |  Branch (709:26): [True: 321k, False: 58.8M]
  ------------------
  710|   321k|            desugar(ast->cond, obj_level);
  711|   321k|            if (ast->message == nullptr) {
  ------------------
  |  Branch (711:17): [True: 23.8k, False: 297k]
  ------------------
  712|  23.8k|                ast->message = str(U"Assertion failed.");
  713|  23.8k|            }
  714|   321k|            desugar(ast->message, obj_level);
  715|   321k|            desugar(ast->rest, obj_level);
  716|       |
  717|       |            // if cond then rest else error msg
  718|   321k|            AST *branch_false = make<Error>(ast->location, EF, ast->message);
  719|   321k|            ast_ = make<Conditional>(
  720|   321k|                ast->location, ast->openFodder, ast->cond, EF, ast->rest, EF, branch_false);
  721|       |
  722|  58.8M|        } else if (auto *ast = dynamic_cast<Binary *>(ast_)) {
  ------------------
  |  Branch (722:26): [True: 6.96M, False: 51.8M]
  ------------------
  723|  6.96M|            desugar(ast->left, obj_level);
  724|  6.96M|            desugar(ast->right, obj_level);
  725|       |
  726|  6.96M|            bool invert = false;
  727|       |
  728|  6.96M|            switch (ast->op) {
  729|   242k|                case BOP_PERCENT: {
  ------------------
  |  Branch (729:17): [True: 242k, False: 6.72M]
  ------------------
  730|   242k|                    AST *f_mod = make<Index>(
  731|   242k|                        E, EF, std(), EF, false, str(U"mod"), EF, nullptr, EF, nullptr, EF);
  732|   242k|                    ArgParams args = {{ast->left, EF}, {ast->right, EF}};
  733|   242k|                    ast_ = make<Apply>(
  734|   242k|                        ast->location, ast->openFodder, f_mod, EF, args, false, EF, EF, false);
  735|   242k|                } break;
  736|       |
  737|   189k|                case BOP_MANIFEST_UNEQUAL: invert = true;
  ------------------
  |  Branch (737:17): [True: 189k, False: 6.77M]
  ------------------
  738|   189k|                [[fallthrough]];
  739|  1.41M|                case BOP_MANIFEST_EQUAL: {
  ------------------
  |  Branch (739:17): [True: 1.22M, False: 5.73M]
  ------------------
  740|  1.41M|                    ast_ = equals(ast->location, ast->left, ast->right);
  741|  1.41M|                    if (invert)
  ------------------
  |  Branch (741:25): [True: 189k, False: 1.22M]
  ------------------
  742|   189k|                        ast_ = make<Unary>(ast->location, ast->openFodder, UOP_NOT, ast_);
  743|  1.41M|                } break;
  744|       |
  745|  5.30M|                default:;
  ------------------
  |  Branch (745:17): [True: 5.30M, False: 1.66M]
  ------------------
  746|       |                    // Otherwise don't change it.
  747|  6.96M|            }
  748|       |
  749|  51.8M|        } else if (dynamic_cast<const BuiltinFunction *>(ast_)) {
  ------------------
  |  Branch (749:20): [True: 0, False: 51.8M]
  ------------------
  750|       |            // Nothing to do.
  751|       |
  752|  51.8M|        } else if (auto *ast = dynamic_cast<Conditional *>(ast_)) {
  ------------------
  |  Branch (752:26): [True: 2.60M, False: 49.2M]
  ------------------
  753|  2.60M|            desugar(ast->cond, obj_level);
  754|  2.60M|            desugar(ast->branchTrue, obj_level);
  755|  2.60M|            if (ast->branchFalse == nullptr)
  ------------------
  |  Branch (755:17): [True: 31.3k, False: 2.57M]
  ------------------
  756|  31.3k|                ast->branchFalse = null();
  757|  2.60M|            desugar(ast->branchFalse, obj_level);
  758|       |
  759|  49.2M|        } else if (auto *ast = dynamic_cast<Dollar *>(ast_)) {
  ------------------
  |  Branch (759:26): [True: 36.9k, False: 49.1M]
  ------------------
  760|  36.9k|            if (obj_level == 0) {
  ------------------
  |  Branch (760:17): [True: 200, False: 36.7k]
  ------------------
  761|    200|                throw StaticError(ast->location, "No top-level object found.");
  762|    200|            }
  763|  36.7k|            ast_ = var(id(U"$"));
  764|       |
  765|  49.1M|        } else if (auto *ast = dynamic_cast<Error *>(ast_)) {
  ------------------
  |  Branch (765:26): [True: 540k, False: 48.6M]
  ------------------
  766|   540k|            desugar(ast->expr, obj_level);
  767|       |
  768|  48.6M|        } else if (auto *ast = dynamic_cast<Function *>(ast_)) {
  ------------------
  |  Branch (768:26): [True: 226k, False: 48.4M]
  ------------------
  769|   226k|            desugar(ast->body, obj_level);
  770|   226k|            desugarParams(ast->params, obj_level);
  771|       |
  772|  48.4M|        } else if (auto *ast = dynamic_cast<Import *>(ast_)) {
  ------------------
  |  Branch (772:26): [True: 344, False: 48.4M]
  ------------------
  773|       |            // TODO(dcunnin): Abstract this into a template function if it becomes more common.
  774|    344|            AST *file = ast->file;
  775|    344|            desugar(file, obj_level);
  776|    344|            ast->file = dynamic_cast<LiteralString *>(file);
  777|       |
  778|  48.4M|        } else if (auto *ast = dynamic_cast<Importstr *>(ast_)) {
  ------------------
  |  Branch (778:26): [True: 858, False: 48.4M]
  ------------------
  779|       |            // TODO(dcunnin): Abstract this into a template function if it becomes more common.
  780|    858|            AST *file = ast->file;
  781|    858|            desugar(file, obj_level);
  782|    858|            ast->file = dynamic_cast<LiteralString *>(file);
  783|       |
  784|  48.4M|        } else if (auto *ast = dynamic_cast<Importbin *>(ast_)) {
  ------------------
  |  Branch (784:26): [True: 427, False: 48.4M]
  ------------------
  785|       |            // TODO(dcunnin): Abstract this into a template function if it becomes more common.
  786|    427|            AST *file = ast->file;
  787|    427|            desugar(file, obj_level);
  788|    427|            ast->file = dynamic_cast<LiteralString *>(file);
  789|       |
  790|  48.4M|        } else if (auto *ast = dynamic_cast<InSuper *>(ast_)) {
  ------------------
  |  Branch (790:26): [True: 10.7k, False: 48.4M]
  ------------------
  791|  10.7k|            desugar(ast->element, obj_level);
  792|       |
  793|  48.4M|        } else if (auto *ast = dynamic_cast<Index *>(ast_)) {
  ------------------
  |  Branch (793:26): [True: 7.11M, False: 41.3M]
  ------------------
  794|  7.11M|            desugar(ast->target, obj_level);
  795|  7.11M|            if (ast->isSlice) {
  ------------------
  |  Branch (795:17): [True: 143k, False: 6.96M]
  ------------------
  796|   143k|                if (ast->index == nullptr)
  ------------------
  |  Branch (796:21): [True: 17.7k, False: 125k]
  ------------------
  797|  17.7k|                    ast->index = null();
  798|   143k|                desugar(ast->index, obj_level);
  799|       |
  800|   143k|                if (ast->end == nullptr)
  ------------------
  |  Branch (800:21): [True: 80.3k, False: 63.0k]
  ------------------
  801|  80.3k|                    ast->end = null();
  802|   143k|                desugar(ast->end, obj_level);
  803|       |
  804|   143k|                if (ast->step == nullptr)
  ------------------
  |  Branch (804:21): [True: 135k, False: 8.13k]
  ------------------
  805|   135k|                    ast->step = null();
  806|   143k|                desugar(ast->step, obj_level);
  807|       |
  808|   143k|                ast_ = make<Apply>(
  809|   143k|                    ast->location,
  810|   143k|                    EF,
  811|   143k|                    make<Index>(
  812|   143k|                        E, EF, std(), EF, false, str(U"slice"), EF, nullptr, EF, nullptr, EF),
  813|   143k|                    EF,
  814|   143k|                    ArgParams{
  815|   143k|                        {ast->target, EF},
  816|   143k|                        {ast->index, EF},
  817|   143k|                        {ast->end, EF},
  818|   143k|                        {ast->step, EF},
  819|   143k|                    },
  820|   143k|                    false,  // trailing comma
  821|   143k|                    EF,
  822|   143k|                    EF,
  823|   143k|                    false  // tailstrict
  824|   143k|                );
  825|  6.96M|            } else {
  826|  6.96M|                if (ast->id != nullptr) {
  ------------------
  |  Branch (826:21): [True: 5.61M, False: 1.35M]
  ------------------
  827|  5.61M|                    assert(ast->index == nullptr);
  ------------------
  |  Branch (827:21): [True: 5.61M, False: 0]
  ------------------
  828|  5.61M|                    ast->index = str(ast->id->name);
  829|  5.61M|                    ast->id = nullptr;
  830|  5.61M|                }
  831|  6.96M|                desugar(ast->index, obj_level);
  832|  6.96M|            }
  833|       |
  834|  41.3M|        } else if (auto *ast = dynamic_cast<Local *>(ast_)) {
  ------------------
  |  Branch (834:26): [True: 1.92M, False: 39.3M]
  ------------------
  835|  1.92M|            for (auto &bind : ast->binds)
  ------------------
  |  Branch (835:29): [True: 2.06M, False: 1.92M]
  ------------------
  836|  2.06M|                desugar(bind.body, obj_level);
  837|  1.92M|            desugar(ast->body, obj_level);
  838|       |
  839|  2.06M|            for (auto &bind : ast->binds) {
  ------------------
  |  Branch (839:29): [True: 2.06M, False: 1.92M]
  ------------------
  840|  2.06M|                if (bind.functionSugar) {
  ------------------
  |  Branch (840:21): [True: 578k, False: 1.48M]
  ------------------
  841|   578k|                    desugarParams(bind.params, obj_level);
  842|   578k|                    bind.body = make<Function>(ast->location,
  843|   578k|                                               ast->openFodder,
  844|   578k|                                               bind.parenLeftFodder,
  845|   578k|                                               bind.params,
  846|   578k|                                               false,
  847|   578k|                                               bind.parenRightFodder,
  848|   578k|                                               bind.body);
  849|   578k|                    bind.functionSugar = false;
  850|   578k|                    bind.params.clear();
  851|   578k|                }
  852|  2.06M|            }
  853|       |
  854|  39.3M|        } else if (dynamic_cast<const LiteralBoolean *>(ast_)) {
  ------------------
  |  Branch (854:20): [True: 669k, False: 38.7M]
  ------------------
  855|       |            // Nothing to do.
  856|       |
  857|  38.7M|        } else if (dynamic_cast<const LiteralNumber *>(ast_)) {
  ------------------
  |  Branch (857:20): [True: 5.09M, False: 33.6M]
  ------------------
  858|       |            // Nothing to do.
  859|       |
  860|  33.6M|        } else if (auto *ast = dynamic_cast<LiteralString *>(ast_)) {
  ------------------
  |  Branch (860:26): [True: 9.74M, False: 23.8M]
  ------------------
  861|  9.74M|            if ((ast->tokenKind != LiteralString::RAW_DESUGARED) &&
  ------------------
  |  Branch (861:17): [True: 3.87M, False: 5.86M]
  ------------------
  862|  3.87M|                (ast->tokenKind != LiteralString::BLOCK) &&
  ------------------
  |  Branch (862:17): [True: 3.87M, False: 570]
  ------------------
  863|  3.87M|                (ast->tokenKind != LiteralString::VERBATIM_DOUBLE) &&
  ------------------
  |  Branch (863:17): [True: 3.87M, False: 223]
  ------------------
  864|  3.87M|                (ast->tokenKind != LiteralString::VERBATIM_SINGLE)) {
  ------------------
  |  Branch (864:17): [True: 3.87M, False: 557]
  ------------------
  865|  3.87M|                ast->value = jsonnet_string_unescape(ast->location, ast->value);
  866|  3.87M|            }
  867|  9.74M|            ast->tokenKind = LiteralString::RAW_DESUGARED;
  868|  9.74M|            ast->blockIndent.clear();
  869|       |
  870|  23.8M|        } else if (dynamic_cast<const LiteralNull *>(ast_)) {
  ------------------
  |  Branch (870:20): [True: 407k, False: 23.4M]
  ------------------
  871|       |            // Nothing to do.
  872|       |
  873|  23.4M|        } else if (auto *ast = dynamic_cast<DesugaredObject *>(ast_)) {
  ------------------
  |  Branch (873:26): [True: 143k, False: 23.3M]
  ------------------
  874|   143k|            for (auto &field : ast->fields) {
  ------------------
  |  Branch (874:30): [True: 114k, False: 143k]
  ------------------
  875|   114k|                desugar(field.name, obj_level);
  876|   114k|                desugar(field.body, obj_level + 1);
  877|   114k|            }
  878|   143k|            for (AST *assert : ast->asserts) {
  ------------------
  |  Branch (878:30): [True: 4.52k, False: 143k]
  ------------------
  879|  4.52k|                desugar(assert, obj_level + 1);
  880|  4.52k|            }
  881|       |
  882|  23.3M|        } else if (auto *ast = dynamic_cast<Object *>(ast_)) {
  ------------------
  |  Branch (882:26): [True: 441k, False: 22.8M]
  ------------------
  883|   441k|            ast_ = makeObject(ast, obj_level);
  884|       |
  885|  22.8M|        } else if (auto *ast = dynamic_cast<ObjectComprehension *>(ast_)) {
  ------------------
  |  Branch (885:26): [True: 35.2k, False: 22.8M]
  ------------------
  886|  35.2k|            ast_ = makeObjectComprehension(ast, obj_level);
  887|       |
  888|  22.8M|        } else if (auto *ast = dynamic_cast<ObjectComprehensionSimple *>(ast_)) {
  ------------------
  |  Branch (888:26): [True: 10.6k, False: 22.8M]
  ------------------
  889|  10.6k|            desugar(ast->field, obj_level);
  890|  10.6k|            desugar(ast->value, obj_level + 1);
  891|  10.6k|            desugar(ast->array, obj_level);
  892|       |
  893|  22.8M|        } else if (auto *ast = dynamic_cast<Parens *>(ast_)) {
  ------------------
  |  Branch (893:26): [True: 390k, False: 22.4M]
  ------------------
  894|       |            // Strip parens.
  895|   390k|            desugar(ast->expr, obj_level);
  896|   390k|            ast_ = ast->expr;
  897|       |
  898|  22.4M|        } else if (dynamic_cast<const Self *>(ast_)) {
  ------------------
  |  Branch (898:20): [True: 82.4k, False: 22.3M]
  ------------------
  899|       |            // Nothing to do.
  900|       |
  901|  22.3M|        } else if (auto *ast = dynamic_cast<SuperIndex *>(ast_)) {
  ------------------
  |  Branch (901:26): [True: 11.2k, False: 22.3M]
  ------------------
  902|  11.2k|            if (ast->id != nullptr) {
  ------------------
  |  Branch (902:17): [True: 460, False: 10.7k]
  ------------------
  903|    460|                assert(ast->index == nullptr);
  ------------------
  |  Branch (903:17): [True: 460, False: 0]
  ------------------
  904|    460|                ast->index = str(ast->id->name);
  905|    460|                ast->id = nullptr;
  906|    460|            }
  907|  11.2k|            desugar(ast->index, obj_level);
  908|       |
  909|  22.3M|        } else if (auto *ast = dynamic_cast<Unary *>(ast_)) {
  ------------------
  |  Branch (909:26): [True: 880k, False: 21.4M]
  ------------------
  910|   880k|            desugar(ast->expr, obj_level);
  911|       |
  912|  21.4M|        } else if (dynamic_cast<const Var *>(ast_)) {
  ------------------
  |  Branch (912:20): [True: 21.4M, False: 0]
  ------------------
  913|       |            // Nothing to do.
  914|       |
  915|  21.4M|        } else {
  916|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  917|      0|            std::abort();
  918|      0|        }
  919|  66.8M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_NS0_8BinaryOpESF_EEEPT_DpOT0_:
  110|   101k|    {
  111|   101k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   101k|    }
_ZN7jsonnet8internal9Desugarer22makeArrayComprehensionEPNS0_18ArrayComprehensionE:
  417|   285k|    AST* makeArrayComprehension(ArrayComprehension *ast) {
  418|   285k|        int n = ast->specs.size();
  419|   285k|        AST *zero = make<LiteralNumber>(E, EF, "0.0");
  420|   285k|        AST *one = make<LiteralNumber>(E, EF, "1.0");
  421|   285k|        auto *_r = id(U"$r");
  422|   285k|        auto *_l = id(U"$l");
  423|   285k|        std::vector<const Identifier *> _i(n);
  424|   726k|        for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (424:25): [True: 441k, False: 285k]
  ------------------
  425|   441k|            UStringStream ss;
  426|   441k|            ss << U"$i_" << i;
  427|   441k|            _i[i] = id(ss.str());
  428|   441k|        }
  429|   285k|        std::vector<const Identifier *> _aux(n);
  430|   726k|        for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (430:25): [True: 441k, False: 285k]
  ------------------
  431|   441k|            UStringStream ss;
  432|   441k|            ss << U"$aux_" << i;
  433|   441k|            _aux[i] = id(ss.str());
  434|   441k|        }
  435|       |
  436|       |        // Build it from the inside out.  We keep wrapping 'in' with more ASTs.
  437|   285k|        assert(ast->specs[0].kind == ComprehensionSpec::FOR);
  ------------------
  |  Branch (437:9): [True: 285k, False: 0]
  ------------------
  438|       |
  439|   285k|        int last_for = n - 1;
  440|   415k|        while (ast->specs[last_for].kind != ComprehensionSpec::FOR)
  ------------------
  |  Branch (440:16): [True: 129k, False: 285k]
  ------------------
  441|   129k|            last_for--;
  442|       |        // $aux_{last_for}($i_{last_for} + 1, $r + [body])
  443|   285k|        AST *in = make<Apply>(
  444|   285k|            ast->body->location,
  445|   285k|            EF,
  446|   285k|            var(_aux[last_for]),
  447|   285k|            EF,
  448|   285k|            ArgParams{{make<Binary>(E, EF, var(_i[last_for]), EF, BOP_PLUS, one), EF},
  449|   285k|                {make<Binary>(E, EF, var(_r), EF, BOP_PLUS, singleton(ast->body)), EF}},
  450|   285k|            false,  // trailingComma
  451|   285k|            EF,
  452|   285k|            EF,
  453|   285k|            true  // tailstrict
  454|   285k|        );
  455|   726k|        for (int i = n - 1; i >= 0; --i) {
  ------------------
  |  Branch (455:29): [True: 441k, False: 285k]
  ------------------
  456|   441k|            const ComprehensionSpec &spec = ast->specs[i];
  457|   441k|            AST *out;
  458|   441k|            if (i > 0) {
  ------------------
  |  Branch (458:17): [True: 155k, False: 285k]
  ------------------
  459|   155k|                int prev_for = i - 1;
  460|   343M|                while (ast->specs[prev_for].kind != ComprehensionSpec::FOR)
  ------------------
  |  Branch (460:24): [True: 342M, False: 155k]
  ------------------
  461|   342M|                    prev_for--;
  462|       |
  463|       |                // aux_{prev_for}($i_{prev_for} + 1, $r)
  464|   155k|                out = make<Apply>(  // False branch.
  465|   155k|                    E,
  466|   155k|                    EF,
  467|   155k|                    var(_aux[prev_for]),
  468|   155k|                    EF,
  469|   155k|                    ArgParams{{
  470|   155k|                        make<Binary>(E, EF, var(_i[prev_for]), EF, BOP_PLUS, one),
  471|   155k|                            EF,
  472|   155k|                            },
  473|   155k|                      {
  474|   155k|                        var(_r),
  475|   155k|                            EF,
  476|   155k|                            }},
  477|   155k|                    false,  // trailingComma
  478|   155k|                    EF,
  479|   155k|                    EF,
  480|   155k|                    true  // tailstrict
  481|   155k|                );
  482|   285k|            } else {
  483|   285k|                out = var(_r);
  484|   285k|            }
  485|   441k|            switch (spec.kind) {
  ------------------
  |  Branch (485:21): [True: 441k, False: 0]
  ------------------
  486|   130k|                case ComprehensionSpec::IF: {
  ------------------
  |  Branch (486:17): [True: 130k, False: 310k]
  ------------------
  487|       |                  /*
  488|       |                    if [[[...cond...]]] then
  489|       |                    [[[...in...]]]
  490|       |                    else
  491|       |                    [[[...out...]]]
  492|       |                  */
  493|   130k|                    in = make<Conditional>(ast->location,
  494|   130k|                                           EF,
  495|   130k|                                           spec.expr,
  496|   130k|                                           EF,
  497|   130k|                                           in,  // True branch.
  498|   130k|                                           EF,
  499|   130k|                                           out);  // False branch.
  500|   130k|                } break;
  501|   310k|                case ComprehensionSpec::FOR: {
  ------------------
  |  Branch (501:17): [True: 310k, False: 130k]
  ------------------
  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|   310k|                    in = make<Local>(
  516|   310k|                        ast->location,
  517|   310k|                        EF,
  518|   310k|                        Local::Binds{
  519|   310k|                          bind(_l, spec.expr),  // Need to check expr is an array
  520|   310k|                              bind(_aux[i],
  521|   310k|                                   make<Function>(
  522|   310k|                                       ast->location,
  523|   310k|                                       EF,
  524|   310k|                                       EF,
  525|   310k|                                       ArgParams{{EF, _i[i], EF}, {EF, _r, EF}},
  526|   310k|                                       false,  // trailingComma
  527|   310k|                                       EF,
  528|   310k|                                       make<Conditional>(ast->location,
  529|   310k|                                                         EF,
  530|   310k|                                                         make<Binary>(E,
  531|   310k|                                                                      EF,
  532|   310k|                                                                      var(_i[i]),
  533|   310k|                                                                      EF,
  534|   310k|                                                                      BOP_GREATER_EQ,
  535|   310k|                                                                      length(var(_l))),
  536|   310k|                                                         EF,
  537|   310k|                                                         out,
  538|   310k|                                                         EF,
  539|   310k|                                                         make<Local>(
  540|   310k|                                                             ast->location,
  541|   310k|                                                             EF,
  542|   310k|                                                             singleBind(spec.var,
  543|   310k|                                                                        make<Index>(E,
  544|   310k|                                                                                    EF,
  545|   310k|                                                                                    var(_l),
  546|   310k|                                                                                    EF,
  547|   310k|                                                                                    false,
  548|   310k|                                                                                    var(_i[i]),
  549|   310k|                                                                                    EF,
  550|   310k|                                                                                    nullptr,
  551|   310k|                                                                                    EF,
  552|   310k|                                                                                    nullptr,
  553|   310k|                                                                                    EF)),
  554|   310k|                                                             in))))},
  555|   310k|                        make<Conditional>(
  556|   310k|                            ast->location,
  557|   310k|                            EF,
  558|   310k|                            equals(ast->location, type(var(_l)), str(U"array")),
  559|   310k|                            EF,
  560|   310k|                            make<Apply>(
  561|   310k|                                E,
  562|   310k|                                EF,
  563|   310k|                                var(_aux[i]),
  564|   310k|                                EF,
  565|   310k|                                ArgParams{{zero, EF},
  566|   310k|                                  {
  567|   310k|                                    i == 0 ? make<Array>(
  ------------------
  |  Branch (567:37): [True: 285k, False: 25.3k]
  ------------------
  568|   285k|                                        E, EF, Array::Elements{}, false, EF)
  569|   310k|                                        : static_cast<AST *>(var(_r)),
  570|   310k|                                        EF,
  571|   310k|                                        }},
  572|   310k|                                false,  // trailingComma
  573|   310k|                                EF,
  574|   310k|                                EF,
  575|   310k|                                true),  // tailstrict
  576|   310k|                            EF,
  577|   310k|                            error(ast->location,
  578|   310k|                                  U"In comprehension, can only iterate over array.")));
  579|   310k|                } break;
  580|   441k|            }
  581|   441k|        }
  582|       |
  583|   285k|        return in;
  584|   285k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERA4_KcEEEPT_DpOT0_:
  110|   606k|    {
  111|   606k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   606k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  110|   285k|    {
  111|   285k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   285k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  110|   441k|    {
  111|   441k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   441k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ArrayEEEEPT_DpOT0_:
  110|   285k|    {
  111|   285k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   285k|    }
_ZN7jsonnet8internal9Desugarer9singletonEPNS0_3ASTE:
  163|   285k|    {
  164|   285k|        return make<Array>(
  165|   285k|            body->location, EF, Array::Elements{Array::Element(body, EF)}, false, EF);
  166|   285k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  110|   285k|    {
  111|   285k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   285k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  110|   466k|    {
  111|   466k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   466k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERKPNS0_3ASTESD_RSF_SD_SI_EEEPT_DpOT0_:
  110|   130k|    {
  111|   130k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   130k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  110|   310k|    {
  111|   310k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   310k|    }
_ZN7jsonnet8internal9Desugarer4bindEPKNS0_10IdentifierEPNS0_3ASTE:
  153|  1.26M|    {
  154|  1.26M|        return Local::Bind(EF, id, EF, body, false, EF, ArgParams{}, false, EF, EF);
  155|  1.26M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_NS7_INS0_8ArgParamENS9_ISE_EEEEbSD_PNS0_11ConditionalEEEEPT_DpOT0_:
  110|   310k|    {
  111|   310k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   310k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_6BinaryESD_RPNS0_3ASTESD_PNS0_5LocalEEEEPT_DpOT0_:
  110|   310k|    {
  111|   310k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   310k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_NS0_8BinaryOpEPNS0_5ApplyEEEEPT_DpOT0_:
  110|   310k|    {
  111|   310k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   310k|    }
_ZN7jsonnet8internal9Desugarer6lengthEPNS0_3ASTE:
  199|   310k|    {
  200|   310k|        return stdFunc(U"length", v);
  201|   310k|    }
_ZN7jsonnet8internal9Desugarer7stdFuncERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEEPNS0_3ASTE:
  169|   626k|    {
  170|   626k|        return make<Apply>(
  171|   626k|            v->location,
  172|   626k|            EF,
  173|   626k|            make<Index>(E, EF, std(), EF, false, str(name), EF, nullptr, EF, nullptr, EF),
  174|   626k|            EF,
  175|   626k|            ArgParams{{v, EF}},
  176|   626k|            false,  // trailingComma
  177|   626k|            EF,
  178|   626k|            EF,
  179|   626k|            true  // tailstrict
  180|   626k|        );
  181|   626k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  110|   319k|    {
  111|   319k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   319k|    }
_ZN7jsonnet8internal9Desugarer10singleBindEPKNS0_10IdentifierEPNS0_3ASTE:
  158|   323k|    {
  159|   323k|        return {bind(id, body)};
  160|   323k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bSG_SE_DnSE_DnSE_EEEPT_DpOT0_:
  110|   310k|    {
  111|   310k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   310k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ApplyESD_SF_SD_PNS0_5ErrorEEEEPT_DpOT0_:
  110|   310k|    {
  111|   310k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   310k|    }
_ZN7jsonnet8internal9Desugarer4typeEPNS0_3ASTE:
  204|   315k|    {
  205|   315k|        return stdFunc(U"type", v);
  206|   315k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ArrayEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS8_INS3_7ElementENSA_ISF_EEEEbSE_EEEPT_DpOT0_:
  110|   285k|    {
  111|   285k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   285k|    }
_ZN7jsonnet8internal9Desugarer5errorERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEE:
  224|   310k|    {
  225|   310k|        return error(str(loc, msg));
  226|   310k|    }
_ZN7jsonnet8internal9Desugarer5errorEPNS0_3ASTE:
  219|   407k|    {
  220|   407k|        return make<Error>(msg->location, EF, msg);
  221|   407k|    }
_ZN7jsonnet8internal9Desugarer3strERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEE:
  130|  2.09M|    {
  131|  2.09M|        return make<LiteralString>(loc, EF, s, LiteralString::RAW_DESUGARED, "", "");
  132|  2.09M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_13LiteralStringEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERKNS7_12basic_stringIDiNS7_11char_traitsIDiEENSA_IDiEEEENS3_9TokenKindERA1_KcSP_EEEPT_DpOT0_:
  110|  11.1M|    {
  111|  11.1M|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  11.1M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ErrorEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  110|   728k|    {
  111|   728k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   728k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_SF_SH_SF_EEEPT_DpOT0_:
  110|   321k|    {
  111|   321k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   321k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralStringESE_DnSE_DnSE_EEEPT_DpOT0_:
  110|  2.74M|    {
  111|  2.74M|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  2.74M|    }
_ZN7jsonnet8internal9Desugarer3stdEv:
  145|  2.75M|    {
  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.75M|        return var(id(isStdlib ? U"std" : U"$std"));
  ------------------
  |  Branch (149:23): [True: 1.23M, False: 1.51M]
  ------------------
  150|  2.75M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTERKSB_RNS7_INS0_8ArgParamENS9_ISI_EEEEbSH_SH_bEEEPT_DpOT0_:
  110|   242k|    {
  111|   242k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   242k|    }
_ZN7jsonnet8internal9Desugarer6equalsERKNS0_13LocationRangeEPNS0_3ASTES6_:
  214|  1.72M|    {
  215|  1.72M|        return stdFunc(loc, U"equals", a, b);
  216|  1.72M|    }
_ZN7jsonnet8internal9Desugarer7stdFuncERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEPNS0_3ASTESF_:
  184|  1.73M|    {
  185|  1.73M|        return make<Apply>(
  186|  1.73M|            loc,
  187|  1.73M|            EF,
  188|  1.73M|            make<Index>(E, EF, std(), EF, false, str(name), EF, nullptr, EF, nullptr, EF),
  189|  1.73M|            EF,
  190|  1.73M|            ArgParams{{a, EF}, {b, EF}},
  191|  1.73M|            false,  // trailingComma
  192|  1.73M|            EF,
  193|  1.73M|            EF,
  194|  1.73M|            true  // tailstrict
  195|  1.73M|        );
  196|  1.73M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5IndexESE_NS8_INS0_8ArgParamENSA_ISH_EEEEbSE_SE_bEEEPT_DpOT0_:
  110|  1.73M|    {
  111|  1.73M|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  1.73M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5UnaryEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS0_7UnaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  110|   189k|    {
  111|   189k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   189k|    }
_ZN7jsonnet8internal9Desugarer4nullEv:
  135|   264k|    {
  136|   264k|        return make<LiteralNull>(E, EF);
  137|   264k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11LiteralNullEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  110|   264k|    {
  111|   264k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   264k|    }
_ZN7jsonnet8internal9Desugarer3varEPKNS0_10IdentifierE:
  140|  6.39M|    {
  141|  6.39M|        return make<Var>(E, EF, ident);
  142|  6.39M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_3VarEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  110|  6.39M|    {
  111|  6.39M|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  6.39M|    }
_ZN7jsonnet8internal9Desugarer2idERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  120|  4.79M|    {
  121|  4.79M|        return alloc->makeIdentifier(s);
  122|  4.79M|    }
_ZN7jsonnet8internal9Desugarer13desugarParamsERNSt3__16vectorINS0_8ArgParamENS2_9allocatorIS4_EEEEj:
  232|  2.88M|    {
  233|  3.60M|        for (auto &param : params) {
  ------------------
  |  Branch (233:26): [True: 3.60M, False: 2.88M]
  ------------------
  234|  3.60M|            if (param.expr) {
  ------------------
  |  Branch (234:17): [True: 169k, False: 3.43M]
  ------------------
  235|       |                // Default arg.
  236|   169k|                desugar(param.expr, obj_level);
  237|   169k|            }
  238|  3.60M|        }
  239|  2.88M|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5IndexESD_NS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  110|   769k|    {
  111|   769k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   769k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_8FunctionEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESC_RNS7_INS0_8ArgParamENS9_ISD_EEEEbSC_RPNS0_3ASTEEEEPT_DpOT0_:
  110|   578k|    {
  111|   578k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   578k|    }
_ZN7jsonnet8internal9Desugarer10makeObjectEPNS0_6ObjectEj:
  586|   441k|    AST* makeObject(Object *ast, unsigned obj_level) {
  587|       |        // Hidden variable to allow outer/top binding.
  588|   441k|        if (obj_level == 0) {
  ------------------
  |  Branch (588:13): [True: 25.7k, False: 415k]
  ------------------
  589|  25.7k|            const Identifier *hidden_var = id(U"$");
  590|  25.7k|            auto *body = make<Self>(E, EF);
  591|  25.7k|            ast->fields.push_back(ObjectField::Local(EF, EF, hidden_var, EF, body, EF));
  592|  25.7k|        }
  593|       |
  594|   441k|        SuperVars svs = desugarFields(ast, ast->fields, obj_level);
  595|       |
  596|   441k|        DesugaredObject::Fields new_fields;
  597|   441k|        ASTs new_asserts;
  598|  1.96M|        for (const ObjectField &field : ast->fields) {
  ------------------
  |  Branch (598:39): [True: 1.96M, False: 441k]
  ------------------
  599|  1.96M|            if (field.kind == ObjectField::ASSERT) {
  ------------------
  |  Branch (599:17): [True: 97.0k, False: 1.86M]
  ------------------
  600|  97.0k|                new_asserts.push_back(field.expr2);
  601|  1.86M|            } else if (field.kind == ObjectField::FIELD_EXPR) {
  ------------------
  |  Branch (601:24): [True: 1.86M, False: 0]
  ------------------
  602|  1.86M|                new_fields.emplace_back(field.hide, field.expr1, field.expr2);
  603|  1.86M|            } else {
  604|      0|                std::cerr << "INTERNAL ERROR: field should have been desugared: " << field.kind
  605|      0|                          << std::endl;
  606|      0|            }
  607|  1.96M|        }
  608|       |
  609|   441k|        AST* retval = make<DesugaredObject>(ast->location, new_asserts, new_fields);
  610|   441k|        if (svs.size() > 0) {
  ------------------
  |  Branch (610:13): [True: 2.49k, False: 439k]
  ------------------
  611|  2.49k|            Local::Binds binds;
  612|   200k|            for (const auto &pair : svs) {
  ------------------
  |  Branch (612:35): [True: 200k, False: 2.49k]
  ------------------
  613|   200k|                if (pair.second == nullptr) {
  ------------------
  |  Branch (613:21): [True: 1.01k, False: 199k]
  ------------------
  614|       |                    // Self binding
  615|  1.01k|                    binds.push_back(bind(pair.first, make<Self>(E, EF)));
  616|   199k|                } else {
  617|       |                    // Super binding
  618|   199k|                    binds.push_back(bind(pair.first, pair.second));
  619|   199k|                }
  620|   200k|            }
  621|  2.49k|            retval = make<Local>(ast->location, EF, binds, retval);
  622|  2.49k|        }
  623|       |
  624|   441k|        return retval;
  625|   441k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_4SelfEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEEEEPT_DpOT0_:
  110|  27.2k|    {
  111|  27.2k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  27.2k|    }
_ZN7jsonnet8internal9Desugarer13desugarFieldsEPNS0_3ASTERNSt3__16vectorINS0_11ObjectFieldENS4_9allocatorIS6_EEEEj:
  246|   476k|    {
  247|       |        // Desugar children
  248|  2.08M|        for (auto &field : fields) {
  ------------------
  |  Branch (248:26): [True: 2.08M, False: 476k]
  ------------------
  249|  2.08M|            if (field.expr1 != nullptr)
  ------------------
  |  Branch (249:17): [True: 128k, False: 1.95M]
  ------------------
  250|   128k|                desugar(field.expr1, obj_level);
  251|  2.08M|            desugar(field.expr2, obj_level + 1);
  252|  2.08M|            if (field.expr3 != nullptr)
  ------------------
  |  Branch (252:17): [True: 87.5k, False: 1.99M]
  ------------------
  253|  87.5k|                desugar(field.expr3, obj_level + 1);
  254|  2.08M|            desugarParams(field.params, obj_level + 1);
  255|  2.08M|        }
  256|       |
  257|       |        // Simplify asserts
  258|  2.08M|        for (auto &field : fields) {
  ------------------
  |  Branch (258:26): [True: 2.08M, False: 476k]
  ------------------
  259|  2.08M|            if (field.kind != ObjectField::ASSERT)
  ------------------
  |  Branch (259:17): [True: 1.98M, False: 97.0k]
  ------------------
  260|  1.98M|                continue;
  261|  97.0k|            AST *msg = field.expr3;
  262|  97.0k|            field.expr3 = nullptr;
  263|  97.0k|            if (msg == nullptr) {
  ------------------
  |  Branch (263:17): [True: 9.44k, False: 87.5k]
  ------------------
  264|       |                // The location is what appears in the stacktrace.
  265|  9.44k|                msg = str(field.expr2->location, U"Object assertion failed.");
  266|  9.44k|            }
  267|       |
  268|       |            // if expr2 then true else error msg
  269|  97.0k|            field.expr2 = make<Conditional>(field.expr2->location,
  270|  97.0k|                                            EF,
  271|  97.0k|                                            field.expr2,
  272|  97.0k|                                            EF,
  273|  97.0k|                                            make<LiteralBoolean>(E, EF, true),
  274|  97.0k|                                            EF,
  275|  97.0k|                                            error(msg));
  276|  97.0k|        }
  277|       |
  278|       |        // Remove methods
  279|  2.08M|        for (auto &field : fields) {
  ------------------
  |  Branch (279:26): [True: 2.08M, False: 476k]
  ------------------
  280|  2.08M|            if (!field.methodSugar)
  ------------------
  |  Branch (280:17): [True: 1.09M, False: 989k]
  ------------------
  281|  1.09M|                continue;
  282|   989k|            field.expr2 = make<Function>(field.expr2->location,
  283|   989k|                                         EF,
  284|   989k|                                         field.fodderL,
  285|   989k|                                         field.params,
  286|   989k|                                         field.trailingComma,
  287|   989k|                                         field.fodderR,
  288|   989k|                                         field.expr2);
  289|   989k|            field.methodSugar = false;
  290|   989k|            field.params.clear();
  291|   989k|        }
  292|       |
  293|       |        // Remove object-level locals
  294|   476k|        auto copy = fields;
  295|   476k|        fields.clear();
  296|   476k|        Local::Binds binds;
  297|  2.08M|        for (auto &local : copy) {
  ------------------
  |  Branch (297:26): [True: 2.08M, False: 476k]
  ------------------
  298|  2.08M|            if (local.kind != ObjectField::LOCAL)
  ------------------
  |  Branch (298:17): [True: 2.00M, False: 81.0k]
  ------------------
  299|  2.00M|                continue;
  300|  81.0k|            binds.push_back(bind(local.id, local.expr2));
  301|  81.0k|        }
  302|  2.08M|        for (auto &field : copy) {
  ------------------
  |  Branch (302:26): [True: 2.08M, False: 476k]
  ------------------
  303|  2.08M|            if (field.kind == ObjectField::LOCAL)
  ------------------
  |  Branch (303:17): [True: 81.0k, False: 2.00M]
  ------------------
  304|  81.0k|                continue;
  305|  2.00M|            if (!binds.empty())
  ------------------
  |  Branch (305:17): [True: 1.09M, False: 906k]
  ------------------
  306|  1.09M|                field.expr2 = make<Local>(field.expr2->location, EF, binds, field.expr2);
  307|  2.00M|            fields.push_back(field);
  308|  2.00M|        }
  309|       |
  310|       |        // Change all to FIELD_EXPR
  311|  2.00M|        for (auto &field : fields) {
  ------------------
  |  Branch (311:26): [True: 2.00M, False: 476k]
  ------------------
  312|  2.00M|            switch (field.kind) {
  ------------------
  |  Branch (312:21): [True: 2.00M, False: 0]
  ------------------
  313|  97.0k|                case ObjectField::ASSERT:
  ------------------
  |  Branch (313:17): [True: 97.0k, False: 1.90M]
  ------------------
  314|       |                    // Nothing to do.
  315|  97.0k|                    break;
  316|       |
  317|  1.77M|                case ObjectField::FIELD_ID:
  ------------------
  |  Branch (317:17): [True: 1.77M, False: 225k]
  ------------------
  318|  1.77M|                    field.expr1 = str(field.idLocation, field.id->name);
  319|  1.77M|                    field.kind = ObjectField::FIELD_EXPR;
  320|  1.77M|                    break;
  321|       |
  322|  38.5k|                case ObjectField::FIELD_EXPR:
  ------------------
  |  Branch (322:17): [True: 38.5k, False: 1.96M]
  ------------------
  323|       |                    // Nothing to do.
  324|  38.5k|                    break;
  325|       |
  326|  89.7k|                case ObjectField::FIELD_STR:
  ------------------
  |  Branch (326:17): [True: 89.7k, False: 1.91M]
  ------------------
  327|       |                    // Just set the flag.
  328|  89.7k|                    field.kind = ObjectField::FIELD_EXPR;
  329|  89.7k|                    break;
  330|       |
  331|      0|                case ObjectField::LOCAL:
  ------------------
  |  Branch (331:17): [True: 0, False: 2.00M]
  ------------------
  332|      0|                    std::cerr << "Locals should be removed by now." << std::endl;
  333|      0|                    abort();
  334|  2.00M|            }
  335|  2.00M|        }
  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|   476k|        class SubstituteSelfSuper : public CompilerPass {
  342|   476k|            Desugarer *desugarer;
  343|   476k|            SuperVars &superVars;
  344|   476k|            unsigned &counter;
  345|   476k|            const Identifier *newSelf;
  346|       |
  347|   476k|           public:
  348|   476k|            SubstituteSelfSuper(Desugarer *desugarer, SuperVars &super_vars, unsigned &counter)
  349|   476k|                : CompilerPass(*desugarer->alloc),
  350|   476k|                  desugarer(desugarer),
  351|   476k|                  superVars(super_vars),
  352|   476k|                  counter(counter),
  353|   476k|                  newSelf(nullptr)
  354|   476k|            {
  355|   476k|            }
  356|   476k|            void visitExpr(AST *&expr)
  357|   476k|            {
  358|   476k|                if (dynamic_cast<Self *>(expr)) {
  359|   476k|                    if (newSelf == nullptr) {
  360|   476k|                        newSelf = desugarer->id(U"$outer_self");
  361|   476k|                        superVars.emplace_back(newSelf, nullptr);
  362|   476k|                    }
  363|   476k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, newSelf);
  364|   476k|                } else if (auto *super_index = dynamic_cast<SuperIndex *>(expr)) {
  365|   476k|                    UStringStream ss;
  366|   476k|                    ss << U"$outer_super_index" << (counter++);
  367|   476k|                    const Identifier *super_var = desugarer->id(ss.str());
  368|       |                    // Desugaring of expr should already have occurred.
  369|   476k|                    assert(super_index->index != nullptr);
  370|       |                    // Re-use super_index since we're replacing it here.
  371|   476k|                    superVars.emplace_back(super_var, super_index);
  372|   476k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, super_var);
  373|   476k|                } else if (auto *in_super = dynamic_cast<InSuper *>(expr)) {
  374|   476k|                    UStringStream ss;
  375|   476k|                    ss << U"$outer_in_super" << (counter++);
  376|   476k|                    const Identifier *in_super_var = desugarer->id(ss.str());
  377|       |                    // Re-use in_super since we're replacing it here.
  378|   476k|                    superVars.emplace_back(in_super_var, in_super);
  379|   476k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, in_super_var);
  380|   476k|                }
  381|   476k|                CompilerPass::visitExpr(expr);
  382|   476k|            }
  383|   476k|        };
  384|       |
  385|   476k|        SuperVars super_vars;
  386|   476k|        unsigned counter = 0;
  387|       |
  388|       |        // Remove +:
  389|  2.00M|        for (auto &field : fields) {
  ------------------
  |  Branch (389:26): [True: 2.00M, False: 476k]
  ------------------
  390|  2.00M|            if (!field.superSugar)
  ------------------
  |  Branch (390:17): [True: 1.98M, False: 17.1k]
  ------------------
  391|  1.98M|                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|  17.1k|            AST *index = clone(field.expr1);
  396|       |            // This will remove self/super.
  397|  17.1k|            SubstituteSelfSuper(this, super_vars, counter).expr(index);
  398|  17.1k|            field.expr2 = make<Conditional>(
  399|  17.1k|                ast->location,
  400|  17.1k|                EF,
  401|  17.1k|                make<InSuper>(ast->location, EF, index, EF, EF),
  402|  17.1k|                EF,
  403|  17.1k|                make<Binary>(ast->location,
  404|  17.1k|                             EF,
  405|  17.1k|                             make<SuperIndex>(ast->location, EF, EF, clone(index), EF, nullptr),
  406|  17.1k|                             EF,
  407|  17.1k|                             BOP_PLUS,
  408|  17.1k|                             field.expr2),
  409|  17.1k|                EF,
  410|  17.1k|                clone(field.expr2));
  411|  17.1k|            field.superSugar = false;
  412|  17.1k|        }
  413|       |
  414|   476k|        return super_vars;
  415|   476k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_PNS0_14LiteralBooleanESD_PNS0_5ErrorEEEEPT_DpOT0_:
  110|  97.0k|    {
  111|  97.0k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  97.0k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_14LiteralBooleanEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEbEEEPT_DpOT0_:
  110|  97.0k|    {
  111|  97.0k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  97.0k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_8FunctionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERSB_RNS7_INS0_8ArgParamENS9_ISF_EEEERbSE_RPNS0_3ASTEEEEPT_DpOT0_:
  110|   989k|    {
  111|   989k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   989k|    }
_ZN7jsonnet8internal9Desugarer5cloneEPNS0_3ASTE:
  115|  51.5k|    {
  116|  51.5k|        return clone_ast(*alloc, ast);
  117|  51.5k|    }
_ZZN7jsonnet8internal9Desugarer13desugarFieldsEPNS0_3ASTERNSt3__16vectorINS0_11ObjectFieldENS4_9allocatorIS6_EEEEjEN19SubstituteSelfSuperC2EPS1_RNS5_INS4_4pairIPKNS0_10IdentifierES3_EENS7_ISH_EEEERj:
  349|  17.1k|                : CompilerPass(*desugarer->alloc),
  350|  17.1k|                  desugarer(desugarer),
  351|  17.1k|                  superVars(super_vars),
  352|  17.1k|                  counter(counter),
  353|  17.1k|                  newSelf(nullptr)
  354|  17.1k|            {
  355|  17.1k|            }
_ZZN7jsonnet8internal9Desugarer13desugarFieldsEPNS0_3ASTERNSt3__16vectorINS0_11ObjectFieldENS4_9allocatorIS6_EEEEjEN19SubstituteSelfSuper9visitExprERS3_:
  357|  1.50M|            {
  358|  1.50M|                if (dynamic_cast<Self *>(expr)) {
  ------------------
  |  Branch (358:21): [True: 5.84k, False: 1.50M]
  ------------------
  359|  5.84k|                    if (newSelf == nullptr) {
  ------------------
  |  Branch (359:25): [True: 1.45k, False: 4.39k]
  ------------------
  360|  1.45k|                        newSelf = desugarer->id(U"$outer_self");
  361|  1.45k|                        superVars.emplace_back(newSelf, nullptr);
  362|  1.45k|                    }
  363|  5.84k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, newSelf);
  364|  1.50M|                } else if (auto *super_index = dynamic_cast<SuperIndex *>(expr)) {
  ------------------
  |  Branch (364:34): [True: 110k, False: 1.39M]
  ------------------
  365|   110k|                    UStringStream ss;
  366|   110k|                    ss << U"$outer_super_index" << (counter++);
  367|   110k|                    const Identifier *super_var = desugarer->id(ss.str());
  368|       |                    // Desugaring of expr should already have occurred.
  369|   110k|                    assert(super_index->index != nullptr);
  ------------------
  |  Branch (369:21): [True: 110k, False: 0]
  ------------------
  370|       |                    // Re-use super_index since we're replacing it here.
  371|   110k|                    superVars.emplace_back(super_var, super_index);
  372|   110k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, super_var);
  373|  1.39M|                } else if (auto *in_super = dynamic_cast<InSuper *>(expr)) {
  ------------------
  |  Branch (373:34): [True: 110k, False: 1.28M]
  ------------------
  374|   110k|                    UStringStream ss;
  375|   110k|                    ss << U"$outer_in_super" << (counter++);
  376|   110k|                    const Identifier *in_super_var = desugarer->id(ss.str());
  377|       |                    // Re-use in_super since we're replacing it here.
  378|   110k|                    superVars.emplace_back(in_super_var, in_super);
  379|   110k|                    expr = alloc.make<Var>(expr->location, expr->openFodder, in_super_var);
  380|   110k|                }
  381|  1.50M|                CompilerPass::visitExpr(expr);
  382|  1.50M|            }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_7InSuperESD_PNS0_6BinaryESD_PNS0_3ASTEEEEPT_DpOT0_:
  110|  17.1k|    {
  111|  17.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  17.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_7InSuperEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERPNS0_3ASTESD_SD_EEEPT_DpOT0_:
  110|  17.1k|    {
  111|  17.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  17.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_6BinaryEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_10SuperIndexESD_NS0_8BinaryOpERPNS0_3ASTEEEEPT_DpOT0_:
  110|  17.1k|    {
  111|  17.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  17.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_10SuperIndexEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEESD_PNS0_3ASTESD_DnEEEPT_DpOT0_:
  110|  17.1k|    {
  111|  17.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  17.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_15DesugaredObjectEJRNS0_13LocationRangeERNSt3__14listIPNS0_3ASTENS6_9allocatorIS9_EEEERNS6_6vectorINS3_5FieldENSA_ISF_EEEEEEEPT_DpOT0_:
  110|   441k|    {
  111|   441k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   441k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5LocalEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_4BindENS9_ISE_EEEERPNS0_3ASTEEEEPT_DpOT0_:
  110|  1.13M|    {
  111|  1.13M|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  1.13M|    }
_ZN7jsonnet8internal9Desugarer23makeObjectComprehensionEPNS0_19ObjectComprehensionEj:
  627|  35.2k|    AST* makeObjectComprehension(ObjectComprehension *ast, unsigned obj_level) {
  628|       |        // Hidden variable to allow outer/top binding.
  629|  35.2k|        if (obj_level == 0) {
  ------------------
  |  Branch (629:13): [True: 406, False: 34.7k]
  ------------------
  630|    406|            const Identifier *hidden_var = id(U"$");
  631|    406|            auto *body = make<Self>(E, EF);
  632|    406|            ast->fields.push_back(ObjectField::Local(EF, EF, hidden_var, EF, body, EF));
  633|    406|        }
  634|       |
  635|  35.2k|        SuperVars svs = desugarFields(ast, ast->fields, obj_level);
  636|       |
  637|  35.2k|        AST *field = ast->fields.front().expr1;
  638|  35.2k|        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|  35.2k|        auto *_arr = id(U"$arr");
  646|  35.2k|        AST *zero = make<LiteralNumber>(E, EF, "0.0");
  647|  35.2k|        int counter = 1;
  648|  35.2k|        Local::Binds binds;
  649|  35.2k|        Array::Elements arr_e{Array::Element(field, EF)};
  650|  44.6k|        for (ComprehensionSpec &spec : ast->specs) {
  ------------------
  |  Branch (650:38): [True: 44.6k, False: 35.2k]
  ------------------
  651|  44.6k|            if (spec.kind == ComprehensionSpec::FOR) {
  ------------------
  |  Branch (651:17): [True: 36.2k, False: 8.40k]
  ------------------
  652|  36.2k|                std::stringstream num;
  653|  36.2k|                num << counter++;
  654|  36.2k|                binds.push_back(bind(spec.var,
  655|  36.2k|                                     make<Index>(E,
  656|  36.2k|                                                 EF,
  657|  36.2k|                                                 var(_arr),
  658|  36.2k|                                                 EF,
  659|  36.2k|                                                 false,
  660|  36.2k|                                                 make<LiteralNumber>(E, EF, num.str()),
  661|  36.2k|                                                 EF,
  662|  36.2k|                                                 nullptr,
  663|  36.2k|                                                 EF,
  664|  36.2k|                                                 nullptr,
  665|  36.2k|                                                 EF)));
  666|  36.2k|                arr_e.emplace_back(var(spec.var), EF);
  667|  36.2k|            }
  668|  44.6k|        }
  669|  35.2k|        AST *arr = make<ArrayComprehension>(ast->location,
  670|  35.2k|                                            EF,
  671|  35.2k|                                            make<Array>(ast->location, EF, arr_e, false, EF),
  672|  35.2k|                                            EF,
  673|  35.2k|                                            false,
  674|  35.2k|                                            ast->specs,
  675|  35.2k|                                            EF);
  676|  35.2k|        desugar(arr, obj_level);
  677|  35.2k|        return make<ObjectComprehensionSimple>(
  678|  35.2k|            ast->location,
  679|  35.2k|            make<Index>(E, EF, var(_arr), EF, false, zero, EF, nullptr, EF, nullptr, EF),
  680|  35.2k|            make<Local>(ast->location, EF, binds, value),
  681|  35.2k|            _arr,
  682|  35.2k|            arr);
  683|  35.2k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bPNS0_13LiteralNumberESE_DnSE_DnSE_EEEPT_DpOT0_:
  110|  36.2k|    {
  111|  36.2k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  36.2k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_13LiteralNumberEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEENS7_12basic_stringIcNS7_11char_traitsIcEENSA_IcEEEEEEEPT_DpOT0_:
  110|  36.2k|    {
  111|  36.2k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  36.2k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_18ArrayComprehensionEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_5ArrayESD_bRNS7_INS0_17ComprehensionSpecENS9_ISG_EEEESD_EEEPT_DpOT0_:
  110|  35.1k|    {
  111|  35.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  35.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ArrayEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEERNS7_INS3_7ElementENS9_ISE_EEEEbSD_EEEPT_DpOT0_:
  110|  35.1k|    {
  111|  35.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  35.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_25ObjectComprehensionSimpleEJRNS0_13LocationRangeEPNS0_5IndexEPNS0_5LocalERPKNS0_10IdentifierERPNS0_3ASTEEEEPT_DpOT0_:
  110|  35.1k|    {
  111|  35.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  35.1k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5IndexEJRKNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_3VarESE_bRPNS0_3ASTESE_DnSE_DnSE_EEEPT_DpOT0_:
  110|  35.1k|    {
  111|  35.1k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  35.1k|    }
_ZN7jsonnet8internal9Desugarer3strERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  125|  9.04M|    {
  126|  9.04M|        return make<LiteralString>(E, EF, s, LiteralString::RAW_DESUGARED, "", "");
  127|  9.04M|    }
_ZZN7jsonnet8internal9Desugarer9stdlibASTENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENKUlvE_clEv:
  938|   178k|            auto fnbody = alloc->makeBuiltinBody(E, name_utf8, [this, &decl]()->Identifiers {
  939|   178k|                Identifiers params;
  940|   178k|                for (const auto &p : decl.params)
  ------------------
  |  Branch (940:36): [True: 262k, False: 178k]
  ------------------
  941|   262k|                    params.push_back(this->id(p));
  942|   178k|                return params;
  943|   178k|            });
_ZZN7jsonnet8internal9Desugarer9stdlibASTENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENKUlRKNS0_15DesugaredObject5FieldEE_clESC_:
  945|  40.1M|                [=](const DesugaredObject::Field& f) {
  946|  40.1M|                    return static_cast<LiteralString*>(f.name)->value == decl.name;
  947|  40.1M|                });
_ZN7jsonnet8internal9Desugarer4makeINS0_15BuiltinFunctionEJRKNS0_13LocationRangeERPKNS0_19BuiltinFunctionBodyEEEEPT_DpOT0_:
  110|   328k|    {
  111|   328k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|   328k|    }
_ZN7jsonnet8internal9Desugarer11desugarFileERPNS0_3ASTEPNSt3__13mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS0_5VmExtENS5_4lessISC_EENSA_INS5_4pairIKSC_SD_EEEEEE:
  961|  4.66k|    {
  962|  4.66k|        desugar(ast, 0);
  963|       |
  964|  4.66k|        DesugaredObject *std_obj = stdlibAST(ast->location.file);
  965|       |
  966|  4.66k|        std::vector<std::string> empty;
  967|  4.66k|        auto line_end_blank = Fodder{{FodderElement::LINE_END, 1, 0, empty}};
  968|  4.66k|        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|  4.66k|        if (tlas != nullptr) {
  ------------------
  |  Branch (975:13): [True: 4.24k, False: 422]
  ------------------
  976|  4.24k|            LocationRange tla_loc("Top-level function");
  977|  4.24k|            ArgParams args;
  978|  4.24k|            for (const auto &pair : *tlas) {
  ------------------
  |  Branch (978:35): [True: 0, False: 4.24k]
  ------------------
  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|  4.24k|            const Identifier *body = id(U"top_level");
  991|  4.24k|            ast =
  992|  4.24k|                make<Local>(ast->location,
  993|  4.24k|                            line_end_blank,
  994|  4.24k|                            singleBind(body, ast),
  995|  4.24k|                            make<Conditional>(E,
  996|  4.24k|                                              line_end,
  997|  4.24k|                                              primitiveEquals(E, type(var(body)), str(U"function")),
  998|  4.24k|                                              EF,
  999|  4.24k|                                              make<Apply>(tla_loc,
 1000|  4.24k|                                                          EF,
 1001|  4.24k|                                                          make<Var>(E, line_end, body),
 1002|  4.24k|                                                          EF,
 1003|  4.24k|                                                          args,
 1004|  4.24k|                                                          false,  // trailing comma
 1005|  4.24k|                                                          EF,
 1006|  4.24k|                                                          EF,
 1007|  4.24k|                                                          false  // tailstrict
 1008|  4.24k|                                                          ),
 1009|  4.24k|                                              line_end,
 1010|  4.24k|                                              make<Var>(E, line_end, body)));
 1011|  4.24k|        }
 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|  4.66k|        ast = make<Local>(ast->location, EF, singleBind(id(U"std"), std()), ast);
 1018|  4.66k|        ast = make<Local>(ast->location, EF, singleBind(id(U"$std"), std_obj), ast);
 1019|  4.66k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5LocalEJRNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEENS7_INS3_4BindENS9_ISD_EEEEPNS0_11ConditionalEEEEPT_DpOT0_:
  110|  4.24k|    {
  111|  4.24k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  4.24k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_11ConditionalEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEEPNS0_5ApplyERKSC_SF_SD_PNS0_3VarEEEEPT_DpOT0_:
  110|  4.24k|    {
  111|  4.24k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  4.24k|    }
_ZN7jsonnet8internal9Desugarer15primitiveEqualsERKNS0_13LocationRangeEPNS0_3ASTES6_:
  209|  4.24k|    {
  210|  4.24k|        return stdFunc(loc, U"primitiveEquals", a, b);
  211|  4.24k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_5ApplyEJRNS0_13LocationRangeERKNSt3__16vectorINS0_13FodderElementENS6_9allocatorIS8_EEEEPNS0_3VarESD_RNS7_INS0_8ArgParamENS9_ISG_EEEEbSD_SD_bEEEPT_DpOT0_:
  110|  4.24k|    {
  111|  4.24k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  4.24k|    }
_ZN7jsonnet8internal9Desugarer4makeINS0_3VarEJRKNS0_13LocationRangeERNSt3__16vectorINS0_13FodderElementENS7_9allocatorIS9_EEEERPKNS0_10IdentifierEEEEPT_DpOT0_:
  110|  8.48k|    {
  111|  8.48k|        return alloc->make<T>(std::forward<Args>(args)...);
  112|  8.48k|    }

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

_ZN7jsonnet8internal26allowed_at_end_of_operatorEc:
  174|  5.25M|bool allowed_at_end_of_operator(char c) {
  175|  5.25M|    switch (c) {
  ------------------
  |  Branch (175:13): [True: 1.91M, False: 3.34M]
  ------------------
  176|  1.07M|        case '+':
  ------------------
  |  Branch (176:9): [True: 1.07M, False: 4.18M]
  ------------------
  177|  1.17M|        case '-':
  ------------------
  |  Branch (177:9): [True: 105k, False: 5.15M]
  ------------------
  178|  1.54M|        case '~':
  ------------------
  |  Branch (178:9): [True: 361k, False: 4.89M]
  ------------------
  179|  1.83M|        case '!':
  ------------------
  |  Branch (179:9): [True: 296k, False: 4.96M]
  ------------------
  180|  1.91M|        case '$': return false;
  ------------------
  |  Branch (180:9): [True: 79.8k, False: 5.17M]
  ------------------
  181|  5.25M|    }
  182|  3.34M|    return true;
  183|  5.25M|}
_ZN7jsonnet8internal20lex_get_keyword_kindERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  207|  46.9M|{
  208|  46.9M|    auto it = keywords.find(identifier);
  209|  46.9M|    if (it == keywords.end())
  ------------------
  |  Branch (209:9): [True: 34.3M, False: 12.6M]
  ------------------
  210|  34.3M|        return Token::IDENTIFIER;
  211|  12.6M|    return it->second;
  212|  46.9M|}
_ZN7jsonnet8internal10lex_numberERPKcRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKNS0_8LocationE:
  215|  5.46M|{
  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|  5.46M|    enum State {
  227|  5.46M|        BEGIN,
  228|  5.46M|        AFTER_ZERO,
  229|  5.46M|        AFTER_ONE_TO_NINE,
  230|  5.46M|        AFTER_INT_UNDERSCORE,
  231|  5.46M|        AFTER_DOT,
  232|  5.46M|        AFTER_DIGIT,
  233|  5.46M|        AFTER_FRAC_UNDERSCORE,
  234|  5.46M|        AFTER_E,
  235|  5.46M|        AFTER_EXP_SIGN,
  236|  5.46M|        AFTER_EXP_DIGIT,
  237|  5.46M|        AFTER_EXP_UNDERSCORE
  238|  5.46M|    } state;
  239|       |
  240|  5.46M|    std::string r;
  241|       |
  242|  5.46M|    state = BEGIN;
  243|  11.8M|    while (true) {
  ------------------
  |  Branch (243:12): [True: 11.8M, Folded]
  ------------------
  244|  11.8M|        switch (state) {
  ------------------
  |  Branch (244:17): [True: 11.8M, False: 0]
  ------------------
  245|  5.46M|            case BEGIN:
  ------------------
  |  Branch (245:13): [True: 5.46M, False: 6.36M]
  ------------------
  246|  5.46M|                switch (*c) {
  247|  1.13M|                    case '0': state = AFTER_ZERO; break;
  ------------------
  |  Branch (247:21): [True: 1.13M, False: 4.32M]
  ------------------
  248|       |
  249|  1.40M|                    case '1':
  ------------------
  |  Branch (249:21): [True: 1.40M, False: 4.05M]
  ------------------
  250|  1.70M|                    case '2':
  ------------------
  |  Branch (250:21): [True: 294k, False: 5.16M]
  ------------------
  251|  1.92M|                    case '3':
  ------------------
  |  Branch (251:21): [True: 227k, False: 5.23M]
  ------------------
  252|  2.17M|                    case '4':
  ------------------
  |  Branch (252:21): [True: 248k, False: 5.21M]
  ------------------
  253|  2.23M|                    case '5':
  ------------------
  |  Branch (253:21): [True: 60.1k, False: 5.40M]
  ------------------
  254|  2.60M|                    case '6':
  ------------------
  |  Branch (254:21): [True: 365k, False: 5.09M]
  ------------------
  255|  2.63M|                    case '7':
  ------------------
  |  Branch (255:21): [True: 29.7k, False: 5.43M]
  ------------------
  256|  3.31M|                    case '8':
  ------------------
  |  Branch (256:21): [True: 682k, False: 4.77M]
  ------------------
  257|  4.32M|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (257:21): [True: 1.01M, False: 4.45M]
  ------------------
  258|       |
  259|      0|                    default: throw StaticError(filename, begin, "couldn't lex number");
  ------------------
  |  Branch (259:21): [True: 0, False: 5.46M]
  ------------------
  260|  5.46M|                }
  261|  5.46M|                break;
  262|       |
  263|  5.46M|            case AFTER_ZERO:
  ------------------
  |  Branch (263:13): [True: 1.13M, False: 10.6M]
  ------------------
  264|  1.13M|                switch (*c) {
  265|  16.8k|                    case '.': state = AFTER_DOT; break;
  ------------------
  |  Branch (265:21): [True: 16.8k, False: 1.11M]
  ------------------
  266|       |
  267|    373|                    case 'e':
  ------------------
  |  Branch (267:21): [True: 373, False: 1.13M]
  ------------------
  268|    623|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (268:21): [True: 250, False: 1.13M]
  ------------------
  269|       |
  270|      2|                    case '_': {
  ------------------
  |  Branch (270:21): [True: 2, False: 1.13M]
  ------------------
  271|      2|                        std::stringstream ss;
  272|      2|                        ss << "couldn't lex number, _ not allowed after leading 0";
  273|      2|                        throw StaticError(filename, begin, ss.str());
  274|    373|                    }
  275|       |
  276|  1.11M|                    default: goto end;
  ------------------
  |  Branch (276:21): [True: 1.11M, False: 17.4k]
  ------------------
  277|  1.13M|                }
  278|  17.4k|                break;
  279|       |
  280|  4.97M|            case AFTER_ONE_TO_NINE:
  ------------------
  |  Branch (280:13): [True: 4.97M, False: 6.84M]
  ------------------
  281|  4.97M|                switch (*c) {
  282|  10.7k|                    case '.': state = AFTER_DOT; break;
  ------------------
  |  Branch (282:21): [True: 10.7k, False: 4.96M]
  ------------------
  283|       |
  284|  1.01k|                    case 'e':
  ------------------
  |  Branch (284:21): [True: 1.01k, False: 4.97M]
  ------------------
  285|  1.99k|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (285:21): [True: 974, False: 4.97M]
  ------------------
  286|       |
  287|   249k|                    case '0':
  ------------------
  |  Branch (287:21): [True: 249k, False: 4.72M]
  ------------------
  288|   267k|                    case '1':
  ------------------
  |  Branch (288:21): [True: 17.3k, False: 4.96M]
  ------------------
  289|   357k|                    case '2':
  ------------------
  |  Branch (289:21): [True: 90.2k, False: 4.88M]
  ------------------
  290|   392k|                    case '3':
  ------------------
  |  Branch (290:21): [True: 35.1k, False: 4.94M]
  ------------------
  291|   435k|                    case '4':
  ------------------
  |  Branch (291:21): [True: 42.6k, False: 4.93M]
  ------------------
  292|   514k|                    case '5':
  ------------------
  |  Branch (292:21): [True: 79.5k, False: 4.89M]
  ------------------
  293|   566k|                    case '6':
  ------------------
  |  Branch (293:21): [True: 52.1k, False: 4.92M]
  ------------------
  294|   594k|                    case '7':
  ------------------
  |  Branch (294:21): [True: 28.0k, False: 4.95M]
  ------------------
  295|   629k|                    case '8':
  ------------------
  |  Branch (295:21): [True: 34.1k, False: 4.94M]
  ------------------
  296|   652k|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (296:21): [True: 23.5k, False: 4.95M]
  ------------------
  297|       |
  298|    167|                    case '_': state = AFTER_INT_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (298:21): [True: 167, False: 4.97M]
  ------------------
  299|       |
  300|  4.31M|                    default: goto end;
  ------------------
  |  Branch (300:21): [True: 4.31M, False: 665k]
  ------------------
  301|  4.97M|                }
  302|   665k|                break;
  303|       |
  304|   665k|            case AFTER_INT_UNDERSCORE:
  ------------------
  |  Branch (304:13): [True: 167, False: 11.8M]
  ------------------
  305|    167|                switch (*c) {
  306|       |                    // The only valid transition from _ is to a digit.
  307|      0|                    case '0':
  ------------------
  |  Branch (307:21): [True: 0, False: 167]
  ------------------
  308|     25|                    case '1':
  ------------------
  |  Branch (308:21): [True: 25, False: 142]
  ------------------
  309|     30|                    case '2':
  ------------------
  |  Branch (309:21): [True: 5, False: 162]
  ------------------
  310|     30|                    case '3':
  ------------------
  |  Branch (310:21): [True: 0, False: 167]
  ------------------
  311|     34|                    case '4':
  ------------------
  |  Branch (311:21): [True: 4, False: 163]
  ------------------
  312|     34|                    case '5':
  ------------------
  |  Branch (312:21): [True: 0, False: 167]
  ------------------
  313|     34|                    case '6':
  ------------------
  |  Branch (313:21): [True: 0, False: 167]
  ------------------
  314|     34|                    case '7':
  ------------------
  |  Branch (314:21): [True: 0, False: 167]
  ------------------
  315|    157|                    case '8':
  ------------------
  |  Branch (315:21): [True: 123, False: 44]
  ------------------
  316|    157|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (316:21): [True: 0, False: 167]
  ------------------
  317|       |
  318|     10|                    default: {
  ------------------
  |  Branch (318:21): [True: 10, False: 157]
  ------------------
  319|     10|                        std::stringstream ss;
  320|     10|                        ss << "couldn't lex number, junk after _: " << *c;
  321|     10|                        throw StaticError(filename, begin, ss.str());
  322|    157|                    }
  323|    167|                }
  324|    157|                break;
  325|       |
  326|  27.5k|            case AFTER_DOT:
  ------------------
  |  Branch (326:13): [True: 27.5k, False: 11.7M]
  ------------------
  327|  27.5k|                switch (*c) {
  328|  1.20k|                    case '0':
  ------------------
  |  Branch (328:21): [True: 1.20k, False: 26.3k]
  ------------------
  329|  9.29k|                    case '1':
  ------------------
  |  Branch (329:21): [True: 8.09k, False: 19.4k]
  ------------------
  330|  10.3k|                    case '2':
  ------------------
  |  Branch (330:21): [True: 1.05k, False: 26.5k]
  ------------------
  331|  10.6k|                    case '3':
  ------------------
  |  Branch (331:21): [True: 340, False: 27.2k]
  ------------------
  332|  11.0k|                    case '4':
  ------------------
  |  Branch (332:21): [True: 384, False: 27.1k]
  ------------------
  333|  26.7k|                    case '5':
  ------------------
  |  Branch (333:21): [True: 15.6k, False: 11.9k]
  ------------------
  334|  26.9k|                    case '6':
  ------------------
  |  Branch (334:21): [True: 268, False: 27.3k]
  ------------------
  335|  27.0k|                    case '7':
  ------------------
  |  Branch (335:21): [True: 56, False: 27.5k]
  ------------------
  336|  27.4k|                    case '8':
  ------------------
  |  Branch (336:21): [True: 375, False: 27.2k]
  ------------------
  337|  27.5k|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (337:21): [True: 157, False: 27.4k]
  ------------------
  338|       |
  339|      9|                    default: {
  ------------------
  |  Branch (339:21): [True: 9, False: 27.5k]
  ------------------
  340|      9|                        std::stringstream ss;
  341|      9|                        ss << "couldn't lex number, junk after decimal point: " << *c;
  342|      9|                        throw StaticError(filename, begin, ss.str());
  343|  27.4k|                    }
  344|  27.5k|                }
  345|  27.5k|                break;
  346|       |
  347|   194k|            case AFTER_DIGIT:
  ------------------
  |  Branch (347:13): [True: 194k, False: 11.6M]
  ------------------
  348|   194k|                switch (*c) {
  349|    554|                    case 'e':
  ------------------
  |  Branch (349:21): [True: 554, False: 193k]
  ------------------
  350|  1.02k|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (350:21): [True: 474, False: 193k]
  ------------------
  351|       |
  352|  17.8k|                    case '0':
  ------------------
  |  Branch (352:21): [True: 17.8k, False: 176k]
  ------------------
  353|  42.8k|                    case '1':
  ------------------
  |  Branch (353:21): [True: 24.9k, False: 169k]
  ------------------
  354|  52.3k|                    case '2':
  ------------------
  |  Branch (354:21): [True: 9.50k, False: 184k]
  ------------------
  355|  68.7k|                    case '3':
  ------------------
  |  Branch (355:21): [True: 16.4k, False: 177k]
  ------------------
  356|  77.4k|                    case '4':
  ------------------
  |  Branch (356:21): [True: 8.66k, False: 185k]
  ------------------
  357|   102k|                    case '5':
  ------------------
  |  Branch (357:21): [True: 25.3k, False: 168k]
  ------------------
  358|   118k|                    case '6':
  ------------------
  |  Branch (358:21): [True: 15.9k, False: 178k]
  ------------------
  359|   127k|                    case '7':
  ------------------
  |  Branch (359:21): [True: 9.04k, False: 185k]
  ------------------
  360|   142k|                    case '8':
  ------------------
  |  Branch (360:21): [True: 14.6k, False: 179k]
  ------------------
  361|   166k|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (361:21): [True: 23.8k, False: 170k]
  ------------------
  362|       |
  363|    215|                    case '_': state = AFTER_FRAC_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (363:21): [True: 215, False: 193k]
  ------------------
  364|       |
  365|  26.5k|                    default: goto end;
  ------------------
  |  Branch (365:21): [True: 26.5k, False: 167k]
  ------------------
  366|   194k|                }
  367|   167k|                break;
  368|       |
  369|   167k|            case AFTER_FRAC_UNDERSCORE:
  ------------------
  |  Branch (369:13): [True: 215, False: 11.8M]
  ------------------
  370|    215|                switch (*c) {
  371|       |                    // The only valid transition from _ is to a digit.
  372|      1|                    case '0':
  ------------------
  |  Branch (372:21): [True: 1, False: 214]
  ------------------
  373|     10|                    case '1':
  ------------------
  |  Branch (373:21): [True: 9, False: 206]
  ------------------
  374|     13|                    case '2':
  ------------------
  |  Branch (374:21): [True: 3, False: 212]
  ------------------
  375|     13|                    case '3':
  ------------------
  |  Branch (375:21): [True: 0, False: 215]
  ------------------
  376|     13|                    case '4':
  ------------------
  |  Branch (376:21): [True: 0, False: 215]
  ------------------
  377|     20|                    case '5':
  ------------------
  |  Branch (377:21): [True: 7, False: 208]
  ------------------
  378|     20|                    case '6':
  ------------------
  |  Branch (378:21): [True: 0, False: 215]
  ------------------
  379|     20|                    case '7':
  ------------------
  |  Branch (379:21): [True: 0, False: 215]
  ------------------
  380|    214|                    case '8':
  ------------------
  |  Branch (380:21): [True: 194, False: 21]
  ------------------
  381|    214|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (381:21): [True: 0, False: 215]
  ------------------
  382|       |
  383|      1|                    default: {
  ------------------
  |  Branch (383:21): [True: 1, False: 214]
  ------------------
  384|      1|                        std::stringstream ss;
  385|      1|                        ss << "couldn't lex number, junk after _: " << *c;
  386|      1|                        throw StaticError(filename, begin, ss.str());
  387|    214|                    }
  388|    215|                }
  389|    214|                break;
  390|       |
  391|  3.64k|            case AFTER_E:
  ------------------
  |  Branch (391:13): [True: 3.64k, False: 11.8M]
  ------------------
  392|  3.64k|                switch (*c) {
  393|    139|                    case '+':
  ------------------
  |  Branch (393:21): [True: 139, False: 3.50k]
  ------------------
  394|  1.00k|                    case '-': state = AFTER_EXP_SIGN; break;
  ------------------
  |  Branch (394:21): [True: 862, False: 2.78k]
  ------------------
  395|       |
  396|    880|                    case '0':
  ------------------
  |  Branch (396:21): [True: 880, False: 2.76k]
  ------------------
  397|  1.22k|                    case '1':
  ------------------
  |  Branch (397:21): [True: 341, False: 3.30k]
  ------------------
  398|  1.60k|                    case '2':
  ------------------
  |  Branch (398:21): [True: 388, False: 3.25k]
  ------------------
  399|  1.66k|                    case '3':
  ------------------
  |  Branch (399:21): [True: 57, False: 3.58k]
  ------------------
  400|  1.69k|                    case '4':
  ------------------
  |  Branch (400:21): [True: 24, False: 3.62k]
  ------------------
  401|  1.72k|                    case '5':
  ------------------
  |  Branch (401:21): [True: 30, False: 3.61k]
  ------------------
  402|  2.29k|                    case '6':
  ------------------
  |  Branch (402:21): [True: 573, False: 3.07k]
  ------------------
  403|  2.31k|                    case '7':
  ------------------
  |  Branch (403:21): [True: 19, False: 3.62k]
  ------------------
  404|  2.36k|                    case '8':
  ------------------
  |  Branch (404:21): [True: 51, False: 3.59k]
  ------------------
  405|  2.61k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (405:21): [True: 254, False: 3.39k]
  ------------------
  406|       |
  407|     26|                    default: {
  ------------------
  |  Branch (407:21): [True: 26, False: 3.61k]
  ------------------
  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|  2.36k|                    }
  412|  3.64k|                }
  413|  3.61k|                break;
  414|       |
  415|  3.61k|            case AFTER_EXP_SIGN:
  ------------------
  |  Branch (415:13): [True: 1.00k, False: 11.8M]
  ------------------
  416|  1.00k|                switch (*c) {
  417|    115|                    case '0':
  ------------------
  |  Branch (417:21): [True: 115, False: 886]
  ------------------
  418|    236|                    case '1':
  ------------------
  |  Branch (418:21): [True: 121, False: 880]
  ------------------
  419|    719|                    case '2':
  ------------------
  |  Branch (419:21): [True: 483, False: 518]
  ------------------
  420|    891|                    case '3':
  ------------------
  |  Branch (420:21): [True: 172, False: 829]
  ------------------
  421|    978|                    case '4':
  ------------------
  |  Branch (421:21): [True: 87, False: 914]
  ------------------
  422|    992|                    case '5':
  ------------------
  |  Branch (422:21): [True: 14, False: 987]
  ------------------
  423|    992|                    case '6':
  ------------------
  |  Branch (423:21): [True: 0, False: 1.00k]
  ------------------
  424|    992|                    case '7':
  ------------------
  |  Branch (424:21): [True: 0, False: 1.00k]
  ------------------
  425|    992|                    case '8':
  ------------------
  |  Branch (425:21): [True: 0, False: 1.00k]
  ------------------
  426|    996|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (426:21): [True: 4, False: 997]
  ------------------
  427|       |
  428|      5|                    default: {
  ------------------
  |  Branch (428:21): [True: 5, False: 996]
  ------------------
  429|      5|                        std::stringstream ss;
  430|      5|                        ss << "couldn't lex number, junk after exponent sign: " << *c;
  431|      5|                        throw StaticError(filename, begin, ss.str());
  432|    992|                    }
  433|  1.00k|                }
  434|    996|                break;
  435|       |
  436|  18.9k|            case AFTER_EXP_DIGIT:
  ------------------
  |  Branch (436:13): [True: 18.9k, False: 11.8M]
  ------------------
  437|  18.9k|                switch (*c) {
  438|  1.52k|                    case '0':
  ------------------
  |  Branch (438:21): [True: 1.52k, False: 17.4k]
  ------------------
  439|  3.99k|                    case '1':
  ------------------
  |  Branch (439:21): [True: 2.46k, False: 16.4k]
  ------------------
  440|  5.06k|                    case '2':
  ------------------
  |  Branch (440:21): [True: 1.06k, False: 17.8k]
  ------------------
  441|  6.90k|                    case '3':
  ------------------
  |  Branch (441:21): [True: 1.84k, False: 17.0k]
  ------------------
  442|  8.70k|                    case '4':
  ------------------
  |  Branch (442:21): [True: 1.79k, False: 17.1k]
  ------------------
  443|  10.8k|                    case '5':
  ------------------
  |  Branch (443:21): [True: 2.19k, False: 16.7k]
  ------------------
  444|  11.4k|                    case '6':
  ------------------
  |  Branch (444:21): [True: 512, False: 18.4k]
  ------------------
  445|  12.7k|                    case '7':
  ------------------
  |  Branch (445:21): [True: 1.30k, False: 17.6k]
  ------------------
  446|  13.8k|                    case '8':
  ------------------
  |  Branch (446:21): [True: 1.08k, False: 17.8k]
  ------------------
  447|  14.6k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (447:21): [True: 829, False: 18.1k]
  ------------------
  448|       |
  449|    699|                    case '_': state = AFTER_EXP_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (449:21): [True: 699, False: 18.2k]
  ------------------
  450|       |
  451|  3.61k|                    default: goto end;
  ------------------
  |  Branch (451:21): [True: 3.61k, False: 15.3k]
  ------------------
  452|  18.9k|                }
  453|  14.6k|                break;
  454|       |
  455|  14.6k|            case AFTER_EXP_UNDERSCORE:
  ------------------
  |  Branch (455:13): [True: 699, False: 11.8M]
  ------------------
  456|    699|                switch (*c) {
  457|       |                    // The only valid transition from _ is to a digit.
  458|      0|                    case '0':
  ------------------
  |  Branch (458:21): [True: 0, False: 699]
  ------------------
  459|    528|                    case '1':
  ------------------
  |  Branch (459:21): [True: 528, False: 171]
  ------------------
  460|    528|                    case '2':
  ------------------
  |  Branch (460:21): [True: 0, False: 699]
  ------------------
  461|    528|                    case '3':
  ------------------
  |  Branch (461:21): [True: 0, False: 699]
  ------------------
  462|    695|                    case '4':
  ------------------
  |  Branch (462:21): [True: 167, False: 532]
  ------------------
  463|    695|                    case '5':
  ------------------
  |  Branch (463:21): [True: 0, False: 699]
  ------------------
  464|    695|                    case '6':
  ------------------
  |  Branch (464:21): [True: 0, False: 699]
  ------------------
  465|    695|                    case '7':
  ------------------
  |  Branch (465:21): [True: 0, False: 699]
  ------------------
  466|    698|                    case '8':
  ------------------
  |  Branch (466:21): [True: 3, False: 696]
  ------------------
  467|    698|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (467:21): [True: 0, False: 699]
  ------------------
  468|       |
  469|      1|                    default: {
  ------------------
  |  Branch (469:21): [True: 1, False: 698]
  ------------------
  470|      1|                        std::stringstream ss;
  471|      1|                        ss << "couldn't lex number, junk after _: " << *c;
  472|      1|                        throw StaticError(filename, begin, ss.str());
  473|    698|                    }
  474|    699|                }
  475|    698|                break;
  476|  11.8M|        }
  477|  6.35M|        r += *c;
  478|       |
  479|  6.36M|skip_char:
  480|  6.36M|        c++;
  481|  6.36M|    }
  482|  5.46M|end:
  483|  5.46M|    return r;
  484|  5.46M|}
_ZN7jsonnet8internal11jsonnet_lexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKc:
  521|  15.3k|{
  522|  15.3k|    unsigned long line_number = 1;
  523|  15.3k|    const char *line_start = input;
  524|       |
  525|  15.3k|    Tokens r;
  526|       |
  527|  15.3k|    const char *c = input;
  528|       |
  529|  15.3k|    Fodder fodder;
  530|  15.3k|    bool fresh_line = true;  // Are we tokenizing from the beginning of a new line?
  531|       |
  532|   112M|    while (*c != '\0') {
  ------------------
  |  Branch (532:12): [True: 112M, False: 6.87k]
  ------------------
  533|       |        // Used to ensure we have actually advanced the pointer by the end of the iteration.
  534|   112M|        const char *original_c = c;
  535|       |
  536|   112M|        Token::Kind kind;
  537|   112M|        std::string data;
  538|   112M|        std::string string_block_indent;
  539|   112M|        std::string string_block_term_indent;
  540|       |
  541|   112M|        unsigned new_lines, indent;
  542|   112M|        lex_ws(c, new_lines, indent, line_start, line_number);
  543|       |
  544|       |        // If it's the end of the file, discard final whitespace.
  545|   112M|        if (*c == '\0')
  ------------------
  |  Branch (545:13): [True: 7.98k, False: 112M]
  ------------------
  546|  7.98k|            break;
  547|       |
  548|   112M|        if (new_lines > 0) {
  ------------------
  |  Branch (548:13): [True: 11.7M, False: 101M]
  ------------------
  549|       |            // Otherwise store whitespace in fodder.
  550|  11.7M|            unsigned blanks = new_lines - 1;
  551|  11.7M|            fodder.emplace_back(FodderElement::LINE_END, blanks, indent, EMPTY);
  552|  11.7M|            fresh_line = true;
  553|  11.7M|        }
  554|       |
  555|   112M|        Location begin(line_number, c - line_start + 1);
  556|       |
  557|   112M|        switch (*c) {
  558|       |            // The following operators should never be combined with subsequent symbols.
  559|   491k|            case '{':
  ------------------
  |  Branch (559:13): [True: 491k, False: 112M]
  ------------------
  560|   491k|                kind = Token::BRACE_L;
  561|   491k|                c++;
  562|   491k|                break;
  563|       |
  564|   483k|            case '}':
  ------------------
  |  Branch (564:13): [True: 483k, False: 112M]
  ------------------
  565|   483k|                kind = Token::BRACE_R;
  566|   483k|                c++;
  567|   483k|                break;
  568|       |
  569|  2.55M|            case '[':
  ------------------
  |  Branch (569:13): [True: 2.55M, False: 110M]
  ------------------
  570|  2.55M|                kind = Token::BRACKET_L;
  571|  2.55M|                c++;
  572|  2.55M|                break;
  573|       |
  574|  2.54M|            case ']':
  ------------------
  |  Branch (574:13): [True: 2.54M, False: 110M]
  ------------------
  575|  2.54M|                kind = Token::BRACKET_R;
  576|  2.54M|                c++;
  577|  2.54M|                break;
  578|       |
  579|  10.2M|            case ',':
  ------------------
  |  Branch (579:13): [True: 10.2M, False: 102M]
  ------------------
  580|  10.2M|                kind = Token::COMMA;
  581|  10.2M|                c++;
  582|  10.2M|                break;
  583|       |
  584|  5.61M|            case '.':
  ------------------
  |  Branch (584:13): [True: 5.61M, False: 107M]
  ------------------
  585|  5.61M|                kind = Token::DOT;
  586|  5.61M|                c++;
  587|  5.61M|                break;
  588|       |
  589|  8.46M|            case '(':
  ------------------
  |  Branch (589:13): [True: 8.46M, False: 104M]
  ------------------
  590|  8.46M|                kind = Token::PAREN_L;
  591|  8.46M|                c++;
  592|  8.46M|                break;
  593|       |
  594|  8.45M|            case ')':
  ------------------
  |  Branch (594:13): [True: 8.45M, False: 104M]
  ------------------
  595|  8.45M|                kind = Token::PAREN_R;
  596|  8.45M|                c++;
  597|  8.45M|                break;
  598|       |
  599|  2.21M|            case ';':
  ------------------
  |  Branch (599:13): [True: 2.21M, False: 110M]
  ------------------
  600|  2.21M|                kind = Token::SEMICOLON;
  601|  2.21M|                c++;
  602|  2.21M|                break;
  603|       |
  604|       |            // Numeric literals.
  605|  1.13M|            case '0':
  ------------------
  |  Branch (605:13): [True: 1.13M, False: 111M]
  ------------------
  606|  2.54M|            case '1':
  ------------------
  |  Branch (606:13): [True: 1.40M, False: 111M]
  ------------------
  607|  2.83M|            case '2':
  ------------------
  |  Branch (607:13): [True: 294k, False: 112M]
  ------------------
  608|  3.06M|            case '3':
  ------------------
  |  Branch (608:13): [True: 227k, False: 112M]
  ------------------
  609|  3.31M|            case '4':
  ------------------
  |  Branch (609:13): [True: 248k, False: 112M]
  ------------------
  610|  3.37M|            case '5':
  ------------------
  |  Branch (610:13): [True: 60.1k, False: 112M]
  ------------------
  611|  3.73M|            case '6':
  ------------------
  |  Branch (611:13): [True: 365k, False: 112M]
  ------------------
  612|  3.76M|            case '7':
  ------------------
  |  Branch (612:13): [True: 29.7k, False: 112M]
  ------------------
  613|  4.45M|            case '8':
  ------------------
  |  Branch (613:13): [True: 682k, False: 112M]
  ------------------
  614|  5.46M|            case '9':
  ------------------
  |  Branch (614:13): [True: 1.01M, False: 111M]
  ------------------
  615|  5.46M|                kind = Token::NUMBER;
  616|  5.46M|                data = lex_number(c, filename, begin);
  617|  5.46M|                break;
  618|       |
  619|       |            // UString literals.
  620|   208k|            case '"': {
  ------------------
  |  Branch (620:13): [True: 208k, False: 112M]
  ------------------
  621|   208k|                c++;
  622|  33.7M|                for (;; ++c) {
  623|  33.7M|                    if (*c == '\0') {
  ------------------
  |  Branch (623:25): [True: 28, False: 33.7M]
  ------------------
  624|     28|                        throw StaticError(filename, begin, "unterminated string");
  625|     28|                    }
  626|  33.7M|                    if (*c == '"') {
  ------------------
  |  Branch (626:25): [True: 208k, False: 33.4M]
  ------------------
  627|   208k|                        break;
  628|   208k|                    }
  629|  33.4M|                    if (*c == '\\' && *(c + 1) != '\0') {
  ------------------
  |  Branch (629:25): [True: 53.4k, False: 33.4M]
  |  Branch (629:39): [True: 53.4k, False: 2]
  ------------------
  630|  53.4k|                        data += *c;
  631|  53.4k|                        ++c;
  632|  53.4k|                    }
  633|  33.4M|                    if (*c == '\n') {
  ------------------
  |  Branch (633:25): [True: 2.47M, False: 31.0M]
  ------------------
  634|       |                        // Maintain line/column counters.
  635|  2.47M|                        line_number++;
  636|  2.47M|                        line_start = c + 1;
  637|  2.47M|                    }
  638|  33.4M|                    data += *c;
  639|  33.4M|                }
  640|   208k|                c++;  // Advance beyond the ".
  641|   208k|                kind = Token::STRING_DOUBLE;
  642|   208k|            } break;
  643|       |
  644|       |            // UString literals.
  645|  3.67M|            case '\'': {
  ------------------
  |  Branch (645:13): [True: 3.67M, False: 109M]
  ------------------
  646|  3.67M|                c++;
  647|  51.0M|                for (;; ++c) {
  648|  51.0M|                    if (*c == '\0') {
  ------------------
  |  Branch (648:25): [True: 21, False: 51.0M]
  ------------------
  649|     21|                        throw StaticError(filename, begin, "unterminated string");
  650|     21|                    }
  651|  51.0M|                    if (*c == '\'') {
  ------------------
  |  Branch (651:25): [True: 3.67M, False: 47.3M]
  ------------------
  652|  3.67M|                        break;
  653|  3.67M|                    }
  654|  47.3M|                    if (*c == '\\' && *(c + 1) != '\0') {
  ------------------
  |  Branch (654:25): [True: 415k, False: 46.9M]
  |  Branch (654:39): [True: 415k, False: 1]
  ------------------
  655|   415k|                        data += *c;
  656|   415k|                        ++c;
  657|   415k|                    }
  658|  47.3M|                    if (*c == '\n') {
  ------------------
  |  Branch (658:25): [True: 112k, False: 47.2M]
  ------------------
  659|       |                        // Maintain line/column counters.
  660|   112k|                        line_number++;
  661|   112k|                        line_start = c + 1;
  662|   112k|                    }
  663|  47.3M|                    data += *c;
  664|  47.3M|                }
  665|  3.67M|                c++;  // Advance beyond the '.
  666|  3.67M|                kind = Token::STRING_SINGLE;
  667|  3.67M|            } 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.52k|            case '@': {
  ------------------
  |  Branch (675:13): [True: 2.52k, False: 112M]
  ------------------
  676|  2.52k|                c++;
  677|  2.52k|                if (*c != '"' && *c != '\'') {
  ------------------
  |  Branch (677:21): [True: 1.09k, False: 1.43k]
  |  Branch (677:34): [True: 16, False: 1.08k]
  ------------------
  678|     16|                    std::stringstream ss;
  679|     16|                    ss << "couldn't lex verbatim string, junk after '@': " << *c;
  680|     16|                    throw StaticError(filename, begin, ss.str());
  681|     16|                }
  682|  2.51k|                const char quot = *c;
  683|  2.51k|                c++;  // Advance beyond the opening quote.
  684|  16.1k|                for (;; ++c) {
  685|  16.1k|                    if (*c == '\0') {
  ------------------
  |  Branch (685:25): [True: 22, False: 16.1k]
  ------------------
  686|     22|                        throw StaticError(filename, begin, "unterminated verbatim string");
  687|     22|                    }
  688|  16.1k|                    if (*c == quot) {
  ------------------
  |  Branch (688:25): [True: 2.94k, False: 13.1k]
  ------------------
  689|  2.94k|                        if (*(c + 1) == quot) {
  ------------------
  |  Branch (689:29): [True: 454, False: 2.49k]
  ------------------
  690|    454|                            c++;
  691|  2.49k|                        } else {
  692|  2.49k|                            break;
  693|  2.49k|                        }
  694|  2.94k|                    }
  695|  13.6k|                    data += *c;
  696|  13.6k|                }
  697|  2.49k|                c++;  // Advance beyond the closing quote.
  698|  2.49k|                if (quot == '"') {
  ------------------
  |  Branch (698:21): [True: 1.42k, False: 1.06k]
  ------------------
  699|  1.42k|                    kind = Token::VERBATIM_STRING_DOUBLE;
  700|  1.42k|                } else {
  701|  1.06k|                    kind = Token::VERBATIM_STRING_SINGLE;
  702|  1.06k|                }
  703|  2.49k|            } break;
  704|       |
  705|       |            // Keywords
  706|  62.5M|            default:
  ------------------
  |  Branch (706:13): [True: 62.5M, False: 50.4M]
  ------------------
  707|  62.5M|                if (is_identifier_first(*c)) {
  ------------------
  |  Branch (707:21): [True: 46.9M, False: 15.5M]
  ------------------
  708|  46.9M|                    std::string id;
  709|   256M|                    for (; is_identifier(*c); ++c)
  ------------------
  |  Branch (709:28): [True: 210M, False: 46.9M]
  ------------------
  710|   210M|                        id += *c;
  711|  46.9M|                    kind = lex_get_keyword_kind(id);
  712|  46.9M|                    data = id;
  713|       |
  714|  46.9M|                } else if (is_symbol(*c) || *c == '#') {
  ------------------
  |  Branch (714:28): [True: 13.0M, False: 2.45M]
  |  Branch (714:45): [True: 2.45M, False: 125]
  ------------------
  715|       |                    // Single line C++ and Python style comments.
  716|  15.5M|                    if (*c == '#' || (*c == '/' && *(c + 1) == '/')) {
  ------------------
  |  Branch (716:25): [True: 2.45M, False: 13.0M]
  |  Branch (716:39): [True: 1.14M, False: 11.9M]
  |  Branch (716:52): [True: 727k, False: 420k]
  ------------------
  717|  3.18M|                        std::vector<std::string> comment(1);
  718|  3.18M|                        unsigned blanks;
  719|  3.18M|                        unsigned indent;
  720|  3.18M|                        lex_until_newline(c, comment[0], blanks, indent, line_start, line_number);
  721|  3.18M|                        auto kind = fresh_line ? FodderElement::PARAGRAPH : FodderElement::LINE_END;
  ------------------
  |  Branch (721:37): [True: 3.17M, False: 14.0k]
  ------------------
  722|  3.18M|                        fodder.emplace_back(kind, blanks, indent, comment);
  723|  3.18M|                        fresh_line = true;
  724|  3.18M|                        continue;  // We've not got a token, just fodder, so keep scanning.
  725|  3.18M|                    }
  726|       |
  727|       |                    // Multi-line C style comment.
  728|  12.3M|                    if (*c == '/' && *(c + 1) == '*') {
  ------------------
  |  Branch (728:25): [True: 420k, False: 11.9M]
  |  Branch (728:38): [True: 316k, False: 103k]
  ------------------
  729|   316k|                        unsigned margin = c - line_start;
  730|       |
  731|   316k|                        const char *initial_c = c;
  732|   316k|                        c += 2;  // Avoid matching /*/: skip the /* before starting the search for
  733|       |                                 // */.
  734|       |
  735|  50.7M|                        while (!(*c == '*' && *(c + 1) == '/')) {
  ------------------
  |  Branch (735:34): [True: 537k, False: 50.2M]
  |  Branch (735:47): [True: 316k, False: 221k]
  ------------------
  736|  50.4M|                            if (*c == '\0') {
  ------------------
  |  Branch (736:33): [True: 64, False: 50.4M]
  ------------------
  737|     64|                                auto msg = "multi-line comment has no terminating */.";
  738|     64|                                throw StaticError(filename, begin, msg);
  739|     64|                            }
  740|  50.4M|                            if (*c == '\n') {
  ------------------
  |  Branch (740:33): [True: 6.56M, False: 43.9M]
  ------------------
  741|       |                                // Just keep track of the line / column counters.
  742|  6.56M|                                line_number++;
  743|  6.56M|                                line_start = c + 1;
  744|  6.56M|                            }
  745|  50.4M|                            ++c;
  746|  50.4M|                        }
  747|   316k|                        c += 2;  // Move the pointer to the char after the closing '/'.
  748|       |
  749|   316k|                        std::string comment(initial_c,
  750|   316k|                                            c - initial_c);  // Includes the "/*" and "*/".
  751|       |
  752|       |                        // Lex whitespace after comment
  753|   316k|                        unsigned new_lines_after, indent_after;
  754|   316k|                        lex_ws(c, new_lines_after, indent_after, line_start, line_number);
  755|   316k|                        std::vector<std::string> lines;
  756|   316k|                        if (comment.find('\n') >= comment.length()) {
  ------------------
  |  Branch (756:29): [True: 183k, False: 132k]
  ------------------
  757|       |                            // Comment looks like /* foo */
  758|   183k|                            lines.push_back(comment);
  759|   183k|                            fodder.emplace_back(FodderElement::INTERSTITIAL, 0, 0, lines);
  760|   183k|                            if (new_lines_after > 0) {
  ------------------
  |  Branch (760:33): [True: 179k, False: 3.99k]
  ------------------
  761|   179k|                                fodder.emplace_back(FodderElement::LINE_END,
  762|   179k|                                                    new_lines_after - 1,
  763|   179k|                                                    indent_after,
  764|   179k|                                                    EMPTY);
  765|   179k|                                fresh_line = true;
  766|   179k|                            }
  767|   183k|                        } else {
  768|   132k|                            lines = line_split(comment, margin);
  769|   132k|                            assert(lines[0][0] == '/');
  ------------------
  |  Branch (769:29): [True: 132k, False: 0]
  ------------------
  770|       |                            // Little hack to support PARAGRAPHs with * down the LHS:
  771|       |                            // Add a space to lines that start with a '*'
  772|   132k|                            bool all_star = true;
  773|  6.69M|                            for (auto &l : lines) {
  ------------------
  |  Branch (773:42): [True: 6.69M, False: 132k]
  ------------------
  774|  6.69M|                                if (l[0] != '*')
  ------------------
  |  Branch (774:37): [True: 6.61M, False: 81.7k]
  ------------------
  775|  6.61M|                                    all_star = false;
  776|  6.69M|                            }
  777|   132k|                            if (all_star) {
  ------------------
  |  Branch (777:33): [True: 0, False: 132k]
  ------------------
  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|   132k|                            if (new_lines_after == 0) {
  ------------------
  |  Branch (783:33): [True: 10.2k, False: 122k]
  ------------------
  784|       |                                // Ensure a line end after the paragraph.
  785|  10.2k|                                new_lines_after = 1;
  786|  10.2k|                                indent_after = 0;
  787|  10.2k|                            }
  788|   132k|                            fodder_push_back(fodder,
  789|   132k|                                             FodderElement(FodderElement::PARAGRAPH,
  790|   132k|                                                           new_lines_after - 1,
  791|   132k|                                                           indent_after,
  792|   132k|                                                           lines));
  793|   132k|                            fresh_line = true;
  794|   132k|                        }
  795|   316k|                        continue;  // We've not got a token, just fodder, so keep scanning.
  796|   316k|                    }
  797|       |
  798|       |                    // Text block
  799|  12.0M|                    if (*c == '|' && *(c + 1) == '|' && *(c + 2) == '|') {
  ------------------
  |  Branch (799:25): [True: 232k, False: 11.8M]
  |  Branch (799:38): [True: 170k, False: 62.1k]
  |  Branch (799:57): [True: 4.11k, False: 166k]
  ------------------
  800|  4.11k|                        c += 3;  // Skip the "|||".
  801|       |
  802|  4.11k|                        bool chomp_trailing_nl = false;
  803|  4.11k|                        if (*c == '-') {
  ------------------
  |  Branch (803:29): [True: 220, False: 3.89k]
  ------------------
  804|    220|                            chomp_trailing_nl = true;
  805|    220|                            c++;
  806|    220|                        }
  807|       |
  808|  5.87k|                        while (is_horz_ws(*c)) ++c;  // Chomp whitespace at end of line.
  ------------------
  |  Branch (808:32): [True: 1.75k, False: 4.11k]
  ------------------
  809|  4.11k|                        if (*c != '\n') {
  ------------------
  |  Branch (809:29): [True: 42, False: 4.07k]
  ------------------
  810|     42|                            auto msg = "text block syntax requires new line after |||.";
  811|     42|                            throw StaticError(filename, begin, msg);
  812|     42|                        }
  813|  4.07k|                        std::stringstream block;
  814|  4.07k|                        c++;  // Skip the "\n"
  815|  4.07k|                        line_number++;
  816|       |                        // Skip any blank lines at the beginning of the block.
  817|  6.00k|                        while (*c == '\n') {
  ------------------
  |  Branch (817:32): [True: 1.92k, False: 4.07k]
  ------------------
  818|  1.92k|                            line_number++;
  819|  1.92k|                            ++c;
  820|  1.92k|                            block << '\n';
  821|  1.92k|                        }
  822|  4.07k|                        line_start = c;
  823|  4.07k|                        const char *first_line = c;
  824|  4.07k|                        int ws_chars = whitespace_check(first_line, c);
  825|  4.07k|                        string_block_indent = std::string(first_line, ws_chars);
  826|  4.07k|                        if (ws_chars == 0) {
  ------------------
  |  Branch (826:29): [True: 18, False: 4.05k]
  ------------------
  827|     18|                            auto msg = "text block's first line must start with whitespace.";
  828|     18|                            throw StaticError(filename, begin, msg);
  829|     18|                        }
  830|  5.83k|                        while (true) {
  ------------------
  |  Branch (830:32): [True: 5.83k, Folded]
  ------------------
  831|  5.83k|                            assert(ws_chars > 0);
  ------------------
  |  Branch (831:29): [True: 5.83k, False: 0]
  ------------------
  832|       |                            // Read up to the \n
  833|  94.8k|                            for (c = &c[ws_chars]; *c != '\n'; ++c) {
  ------------------
  |  Branch (833:52): [True: 89.0k, False: 5.76k]
  ------------------
  834|  89.0k|                                if (*c == '\0')
  ------------------
  |  Branch (834:37): [True: 71, False: 89.0k]
  ------------------
  835|     71|                                    throw StaticError(filename, begin, "unexpected EOF");
  836|  89.0k|                                block << *c;
  837|  89.0k|                            }
  838|       |                            // Add the \n
  839|  5.76k|                            block << '\n';
  840|  5.76k|                            ++c;
  841|  5.76k|                            line_number++;
  842|  5.76k|                            line_start = c;
  843|       |                            // Skip any blank lines
  844|  6.79k|                            while (*c == '\n') {
  ------------------
  |  Branch (844:36): [True: 1.03k, False: 5.76k]
  ------------------
  845|  1.03k|                                line_number++;
  846|  1.03k|                                ++c;
  847|  1.03k|                                block << '\n';
  848|  1.03k|                            }
  849|       |                            // Examine next line
  850|  5.76k|                            ws_chars = whitespace_check(first_line, c);
  851|  5.76k|                            if (ws_chars == 0) {
  ------------------
  |  Branch (851:33): [True: 3.98k, False: 1.77k]
  ------------------
  852|       |                                // End of text block (or indentation error).
  853|       |                                // Count actual whitespace on this line.
  854|  3.98k|                                int actual_ws = 0;
  855|  26.7k|                                while (c[actual_ws] == ' ' ||
  ------------------
  |  Branch (855:40): [True: 22.2k, False: 4.49k]
  ------------------
  856|  22.7k|                                       c[actual_ws] == '\t') {
  ------------------
  |  Branch (856:40): [True: 512, False: 3.98k]
  ------------------
  857|  22.7k|                                    actual_ws++;
  858|  22.7k|                                }
  859|       |
  860|       |                                // Check if this is the terminator |||
  861|  3.98k|                                bool is_terminator = (
  862|  3.98k|                                    c[actual_ws] == '|' &&
  ------------------
  |  Branch (862:37): [True: 3.91k, False: 74]
  ------------------
  863|  3.91k|                                    c[actual_ws + 1] == '|' &&
  ------------------
  |  Branch (863:37): [True: 3.90k, False: 8]
  ------------------
  864|  3.90k|                                    c[actual_ws + 2] == '|');
  ------------------
  |  Branch (864:37): [True: 3.89k, False: 6]
  ------------------
  865|       |
  866|  3.98k|                                if (!is_terminator) {
  ------------------
  |  Branch (866:37): [True: 88, False: 3.89k]
  ------------------
  867|       |                                    // Not a terminator - check if it's an
  868|       |                                    // indentation issue.
  869|     88|                                    if (actual_ws > 0) {
  ------------------
  |  Branch (869:41): [True: 42, False: 46]
  ------------------
  870|       |                                        // Has whitespace but doesn't match expected
  871|       |                                        // indentation.
  872|     42|                                        std::stringstream msg;
  873|     42|                                        msg << "text block indentation mismatch: "
  874|     42|                                                "expected at least ";
  875|     42|                                        describe_whitespace(msg, string_block_indent);
  876|     42|                                        msg << ", found ";
  877|     42|                                        describe_whitespace(msg, std::string(c, actual_ws));
  878|     42|                                        throw StaticError(filename, begin, msg.str());
  879|     46|                                    } else {
  880|       |                                        // No whitespace and no ||| - missing
  881|       |                                        // terminator.
  882|     46|                                        auto msg =
  883|     46|                                            "text block not terminated with |||";
  884|     46|                                        throw StaticError(filename, begin, msg);
  885|     46|                                    }
  886|     88|                                }
  887|       |
  888|       |                                // Valid termination - skip over any whitespace.
  889|  25.5k|                                while (*c == ' ' || *c == '\t') {
  ------------------
  |  Branch (889:40): [True: 21.6k, False: 3.92k]
  |  Branch (889:53): [True: 25, False: 3.89k]
  ------------------
  890|  21.6k|                                    string_block_term_indent += *c;
  891|  21.6k|                                    ++c;
  892|  21.6k|                                }
  893|       |                                // Skip the |||
  894|  3.89k|                                c += 3;  // Leave after the last |
  895|  3.89k|                                data = block.str();
  896|  3.89k|                                kind = Token::STRING_BLOCK;
  897|  3.89k|                                if (chomp_trailing_nl) {
  ------------------
  |  Branch (897:37): [True: 207, False: 3.69k]
  ------------------
  898|    207|                                    assert(data.back() == '\n');
  ------------------
  |  Branch (898:37): [True: 207, False: 0]
  ------------------
  899|    207|                                    data.pop_back();
  900|    207|                                }
  901|  3.89k|                                break;  // Out of the while loop.
  902|  3.89k|                            }
  903|  5.76k|                        }
  904|       |
  905|  3.89k|                        break;  // Out of the switch.
  906|  4.05k|                    }
  907|       |
  908|  12.0M|                    const char *operator_begin = c;
  909|  39.1M|                    for (; is_symbol(*c); ++c) {
  ------------------
  |  Branch (909:28): [True: 27.1M, False: 12.0M]
  ------------------
  910|       |                        // Not allowed // in operators
  911|  27.1M|                        if (*c == '/' && *(c + 1) == '/')
  ------------------
  |  Branch (911:29): [True: 104k, False: 27.0M]
  |  Branch (911:42): [True: 365, False: 104k]
  ------------------
  912|    365|                            break;
  913|       |                        // Not allowed /* in operators
  914|  27.1M|                        if (*c == '/' && *(c + 1) == '*')
  ------------------
  |  Branch (914:29): [True: 104k, False: 27.0M]
  |  Branch (914:42): [True: 287, False: 104k]
  ------------------
  915|    287|                            break;
  916|       |                        // Not allowed ||| in operators
  917|  27.1M|                        if (*c == '|' && *(c + 1) == '|' && *(c + 2) == '|')
  ------------------
  |  Branch (917:29): [True: 395k, False: 26.7M]
  |  Branch (917:42): [True: 167k, False: 228k]
  |  Branch (917:61): [True: 684, False: 166k]
  ------------------
  918|    684|                            break;
  919|  27.1M|                    }
  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|  13.9M|                    while (c > operator_begin + 1 && !allowed_at_end_of_operator(*(c - 1))) {
  ------------------
  |  Branch (922:28): [True: 5.25M, False: 8.69M]
  |  Branch (922:54): [True: 1.91M, False: 3.34M]
  ------------------
  923|  1.91M|                        c--;
  924|  1.91M|                    }
  925|  12.0M|                    data += std::string(operator_begin, c);
  926|  12.0M|                    if (data == "$") {
  ------------------
  |  Branch (926:25): [True: 42.0k, False: 11.9M]
  ------------------
  927|  42.0k|                        kind = Token::DOLLAR;
  928|  42.0k|                        data = "";
  929|  11.9M|                    } else {
  930|  11.9M|                        kind = Token::OPERATOR;
  931|  11.9M|                    }
  932|  12.0M|                } else {
  933|    125|                    std::stringstream ss;
  934|    125|                    ss << "Could not lex the character ";
  935|    125|                    auto uc = (unsigned char)(*c);
  936|    125|                    if (*c < 32)
  ------------------
  |  Branch (936:25): [True: 118, False: 7]
  ------------------
  937|    118|                        ss << "code " << unsigned(uc);
  938|      7|                    else
  939|      7|                        ss << "'" << *c << "'";
  940|    125|                    throw StaticError(filename, begin, ss.str());
  941|    125|                }
  942|   112M|        }
  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|   109M|        if (c == original_c) {
  ------------------
  |  Branch (946:13): [True: 0, False: 109M]
  ------------------
  947|      0|            throw StaticError(filename, begin, "internal lexing error:  pointer did not advance");
  948|      0|        }
  949|       |
  950|   109M|        Location end(line_number, (c + 1) - line_start);
  951|   109M|        r.emplace_back(kind,
  952|   109M|                       fodder,
  953|   109M|                       data,
  954|   109M|                       string_block_indent,
  955|   109M|                       string_block_term_indent,
  956|   109M|                       LocationRange(filename, begin, end));
  957|   109M|        fodder.clear();
  958|   109M|        fresh_line = false;
  959|   109M|    }
  960|       |
  961|  14.8k|    Location begin(line_number, c - line_start + 1);
  962|  14.8k|    Location end(line_number, (c + 1) - line_start + 1);
  963|  14.8k|    r.emplace_back(Token::END_OF_FILE, fodder, "", "", "", LocationRange(filename, begin, end));
  964|  14.8k|    return r;
  965|  15.3k|}
lexer.cpp:_ZN7jsonnet8internalL6lex_wsERPKcRjS4_S3_Rm:
   81|   116M|{
   82|   116M|    indent = 0;
   83|   116M|    new_lines = 0;
   84|   270M|    for (; *c != '\0' && is_ws(*c); c++) {
  ------------------
  |  Branch (84:12): [True: 270M, False: 8.47k]
  |  Branch (84:26): [True: 153M, False: 116M]
  ------------------
   85|   153M|        switch (*c) {
  ------------------
  |  Branch (85:17): [True: 153M, False: 0]
  ------------------
   86|   405k|            case '\r':
  ------------------
  |  Branch (86:13): [True: 405k, False: 153M]
  ------------------
   87|       |                // Ignore.
   88|   405k|                break;
   89|       |
   90|  19.9M|            case '\n':
  ------------------
  |  Branch (90:13): [True: 19.9M, False: 133M]
  ------------------
   91|  19.9M|                indent = 0;
   92|  19.9M|                new_lines++;
   93|  19.9M|                line_number++;
   94|  19.9M|                line_start = c + 1;
   95|  19.9M|                break;
   96|       |
   97|   133M|            case ' ': indent += 1; break;
  ------------------
  |  Branch (97:13): [True: 133M, False: 20.4M]
  ------------------
   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|  62.7k|            case '\t': indent += 8; break;
  ------------------
  |  Branch (103:13): [True: 62.7k, False: 153M]
  ------------------
  104|   153M|        }
  105|   153M|    }
  106|   116M|}
lexer.cpp:_ZN7jsonnet8internalL5is_wsEc:
   39|   270M|{
   40|   270M|    return c == '\n' || is_horz_ws(c);
  ------------------
  |  Branch (40:12): [True: 19.9M, False: 250M]
  |  Branch (40:25): [True: 133M, False: 116M]
  ------------------
   41|   270M|}
lexer.cpp:_ZN7jsonnet8internalL19is_identifier_firstEc:
  143|   319M|{
  144|   319M|    return is_upper(c) || is_lower(c) || c == '_';
  ------------------
  |  Branch (144:12): [True: 4.65M, False: 314M]
  |  Branch (144:27): [True: 236M, False: 78.6M]
  |  Branch (144:42): [True: 3.35M, False: 75.2M]
  ------------------
  145|   319M|}
lexer.cpp:_ZN7jsonnet8internalL8is_upperEc:
  128|   319M|{
  129|   319M|    return c >= 'A' && c <= 'Z';
  ------------------
  |  Branch (129:12): [True: 247M, False: 72.4M]
  |  Branch (129:24): [True: 4.65M, False: 242M]
  ------------------
  130|   319M|}
lexer.cpp:_ZN7jsonnet8internalL8is_lowerEc:
  133|   314M|{
  134|   314M|    return c >= 'a' && c <= 'z';
  ------------------
  |  Branch (134:12): [True: 236M, False: 78.3M]
  |  Branch (134:24): [True: 236M, False: 246k]
  ------------------
  135|   314M|}
lexer.cpp:_ZN7jsonnet8internalL13is_identifierEc:
  148|   256M|{
  149|   256M|    return is_identifier_first(c) || is_number(c);
  ------------------
  |  Branch (149:12): [True: 197M, False: 59.7M]
  |  Branch (149:38): [True: 12.7M, False: 46.9M]
  ------------------
  150|   256M|}
lexer.cpp:_ZN7jsonnet8internalL9is_numberEc:
  138|  59.7M|{
  139|  59.7M|    return c >= '0' && c <= '9';
  ------------------
  |  Branch (139:12): [True: 16.8M, False: 42.8M]
  |  Branch (139:24): [True: 12.7M, False: 4.09M]
  ------------------
  140|  59.7M|}
lexer.cpp:_ZN7jsonnet8internalL9is_symbolEc:
  153|  54.7M|{
  154|  54.7M|    switch (c) {
  ------------------
  |  Branch (154:13): [True: 40.2M, False: 14.4M]
  ------------------
  155|  1.23M|        case '!':
  ------------------
  |  Branch (155:9): [True: 1.23M, False: 53.4M]
  ------------------
  156|  1.39M|        case '$':
  ------------------
  |  Branch (156:9): [True: 164k, False: 54.5M]
  ------------------
  157|  7.26M|        case ':':
  ------------------
  |  Branch (157:9): [True: 5.87M, False: 48.8M]
  ------------------
  158|  7.64M|        case '~':
  ------------------
  |  Branch (158:9): [True: 373k, False: 54.3M]
  ------------------
  159|  14.8M|        case '+':
  ------------------
  |  Branch (159:9): [True: 7.21M, False: 47.4M]
  ------------------
  160|  15.8M|        case '-':
  ------------------
  |  Branch (160:9): [True: 1.02M, False: 53.6M]
  ------------------
  161|  16.9M|        case '&':
  ------------------
  |  Branch (161:9): [True: 1.11M, False: 53.5M]
  ------------------
  162|  17.6M|        case '|':
  ------------------
  |  Branch (162:9): [True: 628k, False: 54.0M]
  ------------------
  163|  17.6M|        case '^':
  ------------------
  |  Branch (163:9): [True: 2.33k, False: 54.7M]
  ------------------
  164|  30.1M|        case '=':
  ------------------
  |  Branch (164:9): [True: 12.5M, False: 42.1M]
  ------------------
  165|  31.1M|        case '<':
  ------------------
  |  Branch (165:9): [True: 977k, False: 53.7M]
  ------------------
  166|  32.4M|        case '>':
  ------------------
  |  Branch (166:9): [True: 1.33M, False: 53.3M]
  ------------------
  167|  38.4M|        case '*':
  ------------------
  |  Branch (167:9): [True: 6.01M, False: 48.6M]
  ------------------
  168|  39.7M|        case '/':
  ------------------
  |  Branch (168:9): [True: 1.25M, False: 53.4M]
  ------------------
  169|  40.2M|        case '%': return true;
  ------------------
  |  Branch (169:9): [True: 492k, False: 54.2M]
  ------------------
  170|  54.7M|    }
  171|  14.4M|    return false;
  172|  54.7M|}
lexer.cpp:_ZN7jsonnet8internalL17lex_until_newlineERPKcRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERjSC_S3_Rm:
  113|  3.18M|{
  114|  3.18M|    const char *original_c = c;
  115|  3.18M|    const char *last_non_space = c;
  116|  45.0M|    for (; *c != '\0' && *c != '\n'; c++) {
  ------------------
  |  Branch (116:12): [True: 45.0M, False: 244]
  |  Branch (116:26): [True: 41.9M, False: 3.18M]
  ------------------
  117|  41.9M|        if (!is_horz_ws(*c))
  ------------------
  |  Branch (117:13): [True: 36.0M, False: 5.84M]
  ------------------
  118|  36.0M|            last_non_space = c;
  119|  41.9M|    }
  120|  3.18M|    text = std::string(original_c, last_non_space - original_c + 1);
  121|       |    // Consume subsequent whitespace including the '\n'.
  122|  3.18M|    unsigned new_lines;
  123|  3.18M|    lex_ws(c, new_lines, indent, line_start, line_number);
  124|  3.18M|    blanks = new_lines == 0 ? 0 : new_lines - 1;
  ------------------
  |  Branch (124:14): [True: 244, False: 3.18M]
  ------------------
  125|  3.18M|}
lexer.cpp:_ZN7jsonnet8internalL10line_splitERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   60|   132k|{
   61|   132k|    std::vector<std::string> ret;
   62|   132k|    std::stringstream ss;
   63|  46.1M|    for (size_t i = 0; i < s.length(); ++i) {
  ------------------
  |  Branch (63:24): [True: 45.9M, False: 132k]
  ------------------
   64|  45.9M|        if (s[i] == '\n') {
  ------------------
  |  Branch (64:13): [True: 6.56M, False: 39.4M]
  ------------------
   65|  6.56M|            ret.emplace_back(strip_ws(ss.str(), margin));
   66|  6.56M|            ss.str("");
   67|  39.4M|        } else {
   68|  39.4M|            ss << s[i];
   69|  39.4M|        }
   70|  45.9M|    }
   71|   132k|    ret.emplace_back(strip_ws(ss.str(), margin));
   72|   132k|    return ret;
   73|   132k|}
lexer.cpp:_ZN7jsonnet8internalL8strip_wsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   45|  6.69M|{
   46|  6.69M|    if (s.size() == 0)
  ------------------
  |  Branch (46:9): [True: 5.63M, False: 1.05M]
  ------------------
   47|  5.63M|        return s;  // Avoid underflow below.
   48|  1.05M|    size_t i = 0;
   49|  2.97M|    while (i < s.length() && is_horz_ws(s[i]) && i < margin)
  ------------------
  |  Branch (49:12): [True: 2.97M, False: 3.48k]
  |  Branch (49:30): [True: 2.34M, False: 623k]
  |  Branch (49:50): [True: 1.91M, False: 430k]
  ------------------
   50|  1.91M|        i++;
   51|  1.05M|    size_t j = s.size();
   52|  3.00M|    while (j > i && is_horz_ws(s[j - 1])) {
  ------------------
  |  Branch (52:12): [True: 2.88M, False: 122k]
  |  Branch (52:21): [True: 1.94M, False: 935k]
  ------------------
   53|  1.94M|        j--;
   54|  1.94M|    }
   55|  1.05M|    return std::string(&s[i], &s[j]);
   56|  6.69M|}
lexer.cpp:_ZN7jsonnet8internalL10is_horz_wsEc:
   33|   297M|{
   34|   297M|    return c == ' ' || c == '\t' || c == '\r';
  ------------------
  |  Branch (34:12): [True: 143M, False: 154M]
  |  Branch (34:24): [True: 131k, False: 154M]
  |  Branch (34:37): [True: 413k, False: 154M]
  ------------------
   35|   297M|}
lexer.cpp:_ZN7jsonnet8internalL16whitespace_checkEPKcS2_:
  489|  9.83k|{
  490|  9.83k|    int i = 0;
  491|  83.9k|    while (a[i] == ' ' || a[i] == '\t') {
  ------------------
  |  Branch (491:12): [True: 1.22k, False: 82.7k]
  |  Branch (491:27): [True: 76.9k, False: 5.85k]
  ------------------
  492|  78.1k|        if (b[i] != a[i])
  ------------------
  |  Branch (492:13): [True: 3.98k, False: 74.1k]
  ------------------
  493|  3.98k|            return 0;
  494|  74.1k|        i++;
  495|  74.1k|    }
  496|  5.85k|    return i;
  497|  9.83k|}
lexer.cpp:_ZN7jsonnet8internalL19describe_whitespaceERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_12basic_stringIcS4_S6_EE:
  499|     84|static void describe_whitespace(std::stringstream& msg, const std::string& ws) {
  500|     84|    int spaces = 0;
  501|     84|    int tabs = 0;
  502|  1.94k|    for (char c : ws) {
  ------------------
  |  Branch (502:17): [True: 1.94k, False: 84]
  ------------------
  503|  1.94k|        if (c == ' ')
  ------------------
  |  Branch (503:13): [True: 726, False: 1.22k]
  ------------------
  504|    726|            spaces++;
  505|  1.22k|        else if (c == '\t')
  ------------------
  |  Branch (505:18): [True: 1.22k, False: 0]
  ------------------
  506|  1.22k|            tabs++;
  507|  1.94k|    }
  508|     84|    if (spaces > 0 && tabs > 0) {
  ------------------
  |  Branch (508:9): [True: 48, False: 36]
  |  Branch (508:23): [True: 12, False: 36]
  ------------------
  509|     12|        msg << spaces << (spaces == 1 ? " space" : " spaces") << " and " << tabs
  ------------------
  |  Branch (509:27): [True: 7, False: 5]
  ------------------
  510|     12|            << (tabs == 1 ? " tab" : " tabs");
  ------------------
  |  Branch (510:17): [True: 2, False: 10]
  ------------------
  511|     72|    } else if (spaces > 0) {
  ------------------
  |  Branch (511:16): [True: 36, False: 36]
  ------------------
  512|     36|        msg << spaces << (spaces == 1 ? " space" : " spaces");
  ------------------
  |  Branch (512:27): [True: 13, False: 23]
  ------------------
  513|     36|    } else if (tabs > 0) {
  ------------------
  |  Branch (513:16): [True: 36, False: 0]
  ------------------
  514|     36|        msg << tabs << (tabs == 1 ? " tab" : " tabs");
  ------------------
  |  Branch (514:25): [True: 12, False: 24]
  ------------------
  515|     36|    } else {
  516|      0|        msg << "no indentation";
  517|      0|    }
  518|     84|}

_ZN7jsonnet8internal13FodderElementC2ENS1_4KindEjjRKNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE:
   92|  15.4M|        : kind(kind), blanks(blanks), indent(indent), comment(comment)
   93|  15.4M|    {
   94|  15.4M|        assert(kind != LINE_END || comment.size() <= 1);
  ------------------
  |  Branch (94:9): [True: 3.48M, False: 11.9M]
  |  Branch (94:9): [True: 11.9M, False: 0]
  |  Branch (94:9): [True: 15.4M, False: 0]
  ------------------
   95|  15.4M|        assert(kind != INTERSTITIAL || (blanks == 0 && indent == 0 && comment.size() == 1));
  ------------------
  |  Branch (95:9): [True: 183k, False: 0]
  |  Branch (95:9): [True: 183k, False: 0]
  |  Branch (95:9): [True: 183k, False: 0]
  |  Branch (95:9): [True: 15.2M, False: 183k]
  |  Branch (95:9): [True: 15.4M, False: 0]
  ------------------
   96|  15.4M|        assert(kind != PARAGRAPH || comment.size() >= 1);
  ------------------
  |  Branch (96:9): [True: 12.1M, False: 3.30M]
  |  Branch (96:9): [True: 3.30M, False: 0]
  |  Branch (96:9): [True: 15.4M, False: 0]
  ------------------
   97|  15.4M|    }
_ZNK7jsonnet8internal5Token6data32Ev:
  299|  38.2M|    {
  300|  38.2M|        return decode_utf8(data);
  301|  38.2M|    }
_ZN7jsonnet8internal5TokenC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS6_IcEEEESH_SH_RKNS0_13LocationRangeE:
  308|   109M|        : kind(kind),
  309|   109M|          fodder(fodder),
  310|   109M|          data(data),
  311|   109M|          stringBlockIndent(string_block_indent),
  312|   109M|          stringBlockTermIndent(string_block_term_indent),
  313|   109M|          location(location)
  314|   109M|    {
  315|   109M|    }
_ZN7jsonnet8internal5Token8toStringENS1_4KindE:
  320|  1.07k|    {
  321|  1.07k|        switch (v) {
  322|     12|            case BRACE_L: return "\"{\"";
  ------------------
  |  Branch (322:13): [True: 12, False: 1.05k]
  ------------------
  323|     34|            case BRACE_R: return "\"}\"";
  ------------------
  |  Branch (323:13): [True: 34, False: 1.03k]
  ------------------
  324|      0|            case BRACKET_L: return "\"[\"";
  ------------------
  |  Branch (324:13): [True: 0, False: 1.07k]
  ------------------
  325|     58|            case BRACKET_R: return "\"]\"";
  ------------------
  |  Branch (325:13): [True: 58, False: 1.01k]
  ------------------
  326|     53|            case COMMA: return "\",\"";
  ------------------
  |  Branch (326:13): [True: 53, False: 1.01k]
  ------------------
  327|     36|            case DOLLAR: return "\"$\"";
  ------------------
  |  Branch (327:13): [True: 36, False: 1.03k]
  ------------------
  328|     30|            case DOT: return "\".\"";
  ------------------
  |  Branch (328:13): [True: 30, False: 1.04k]
  ------------------
  329|       |
  330|      2|            case PAREN_L: return "\"(\"";
  ------------------
  |  Branch (330:13): [True: 2, False: 1.06k]
  ------------------
  331|     42|            case PAREN_R: return "\")\"";
  ------------------
  |  Branch (331:13): [True: 42, False: 1.02k]
  ------------------
  332|     36|            case SEMICOLON: return "\";\"";
  ------------------
  |  Branch (332:13): [True: 36, False: 1.03k]
  ------------------
  333|       |
  334|    106|            case IDENTIFIER: return "IDENTIFIER";
  ------------------
  |  Branch (334:13): [True: 106, False: 964]
  ------------------
  335|     39|            case NUMBER: return "NUMBER";
  ------------------
  |  Branch (335:13): [True: 39, False: 1.03k]
  ------------------
  336|    143|            case OPERATOR: return "OPERATOR";
  ------------------
  |  Branch (336:13): [True: 143, False: 927]
  ------------------
  337|     18|            case STRING_SINGLE: return "STRING_SINGLE";
  ------------------
  |  Branch (337:13): [True: 18, False: 1.05k]
  ------------------
  338|     12|            case STRING_DOUBLE: return "STRING_DOUBLE";
  ------------------
  |  Branch (338:13): [True: 12, False: 1.05k]
  ------------------
  339|      4|            case VERBATIM_STRING_SINGLE: return "VERBATIM_STRING_SINGLE";
  ------------------
  |  Branch (339:13): [True: 4, False: 1.06k]
  ------------------
  340|      3|            case VERBATIM_STRING_DOUBLE: return "VERBATIM_STRING_DOUBLE";
  ------------------
  |  Branch (340:13): [True: 3, False: 1.06k]
  ------------------
  341|     10|            case STRING_BLOCK: return "STRING_BLOCK";
  ------------------
  |  Branch (341:13): [True: 10, False: 1.06k]
  ------------------
  342|       |
  343|      2|            case ASSERT: return "assert";
  ------------------
  |  Branch (343:13): [True: 2, False: 1.06k]
  ------------------
  344|      2|            case ELSE: return "else";
  ------------------
  |  Branch (344:13): [True: 2, False: 1.06k]
  ------------------
  345|      1|            case ERROR: return "error";
  ------------------
  |  Branch (345:13): [True: 1, False: 1.06k]
  ------------------
  346|      0|            case FALSE: return "false";
  ------------------
  |  Branch (346:13): [True: 0, False: 1.07k]
  ------------------
  347|      6|            case FOR: return "for";
  ------------------
  |  Branch (347:13): [True: 6, False: 1.06k]
  ------------------
  348|      3|            case FUNCTION: return "function";
  ------------------
  |  Branch (348:13): [True: 3, False: 1.06k]
  ------------------
  349|      2|            case IF: return "if";
  ------------------
  |  Branch (349:13): [True: 2, False: 1.06k]
  ------------------
  350|      1|            case IMPORT: return "import";
  ------------------
  |  Branch (350:13): [True: 1, False: 1.06k]
  ------------------
  351|      1|            case IMPORTSTR: return "importstr";
  ------------------
  |  Branch (351:13): [True: 1, False: 1.06k]
  ------------------
  352|      0|            case IMPORTBIN: return "importbin";
  ------------------
  |  Branch (352:13): [True: 0, False: 1.07k]
  ------------------
  353|     34|            case IN: return "in";
  ------------------
  |  Branch (353:13): [True: 34, False: 1.03k]
  ------------------
  354|      1|            case LOCAL: return "local";
  ------------------
  |  Branch (354:13): [True: 1, False: 1.06k]
  ------------------
  355|      1|            case NULL_LIT: return "null";
  ------------------
  |  Branch (355:13): [True: 1, False: 1.06k]
  ------------------
  356|      0|            case SELF: return "self";
  ------------------
  |  Branch (356:13): [True: 0, False: 1.07k]
  ------------------
  357|      1|            case SUPER: return "super";
  ------------------
  |  Branch (357:13): [True: 1, False: 1.06k]
  ------------------
  358|      1|            case TAILSTRICT: return "tailstrict";
  ------------------
  |  Branch (358:13): [True: 1, False: 1.06k]
  ------------------
  359|      5|            case THEN: return "then";
  ------------------
  |  Branch (359:13): [True: 5, False: 1.06k]
  ------------------
  360|      0|            case TRUE: return "true";
  ------------------
  |  Branch (360:13): [True: 0, False: 1.07k]
  ------------------
  361|       |
  362|    371|            case END_OF_FILE: return "end of file";
  ------------------
  |  Branch (362:13): [True: 371, False: 699]
  ------------------
  363|      0|            default:
  ------------------
  |  Branch (363:13): [True: 0, False: 1.07k]
  ------------------
  364|      0|                std::cerr << "INTERNAL ERROR: Unknown token kind: " << v << std::endl;
  365|      0|                std::abort();
  366|  1.07k|        }
  367|  1.07k|    }
parser.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS0_5Token4KindE:
  387|    619|{
  388|    619|    o << Token::toString(v);
  389|    619|    return o;
  390|    619|}
parser.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_5TokenE:
  393|    495|{
  394|    495|    if (v.data == "") {
  ------------------
  |  Branch (394:9): [True: 325, False: 170]
  ------------------
  395|    325|        o << Token::toString(v.kind);
  396|    325|    } else if (v.kind == Token::OPERATOR) {
  ------------------
  |  Branch (396:16): [True: 44, False: 126]
  ------------------
  397|     44|        o << "\"" << v.data << "\"";
  398|    126|    } else {
  399|    126|        o << "(" << Token::toString(v.kind) << ", \"" << v.data << "\")";
  400|    126|    }
  401|    495|    return o;
  402|    495|}
lexer.cpp:_ZN7jsonnet8internalL16fodder_push_backERNSt3__16vectorINS0_13FodderElementENS1_9allocatorIS3_EEEERKS3_:
  143|   132k|{
  144|   132k|    if (fodder_has_clean_endline(a) && elem.kind == FodderElement::LINE_END) {
  ------------------
  |  Branch (144:9): [True: 119k, False: 12.9k]
  |  Branch (144:40): [True: 0, False: 119k]
  ------------------
  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|   132k|    } else {
  154|   132k|        if (!fodder_has_clean_endline(a) && elem.kind == FodderElement::PARAGRAPH) {
  ------------------
  |  Branch (154:13): [True: 12.9k, False: 119k]
  |  Branch (154:45): [True: 12.9k, False: 0]
  ------------------
  155|  12.9k|            a.emplace_back(FodderElement::LINE_END, 0, elem.indent, std::vector<std::string>());
  156|  12.9k|        }
  157|   132k|        a.push_back(elem);
  158|   132k|    }
  159|   132k|}
lexer.cpp:_ZN7jsonnet8internalL24fodder_has_clean_endlineERKNSt3__16vectorINS0_13FodderElementENS1_9allocatorIS3_EEEE:
  134|   265k|{
  135|   265k|    return !fodder.empty() && fodder.back().kind != FodderElement::INTERSTITIAL;
  ------------------
  |  Branch (135:12): [True: 244k, False: 20.7k]
  |  Branch (135:31): [True: 239k, False: 5.20k]
  ------------------
  136|   265k|}

jsonnet_version:
  334|  15.1k|{
  335|  15.1k|    return LIB_JSONNET_VERSION;
  ------------------
  |  |   34|  15.1k|#define LIB_JSONNET_VERSION "v0.22.0"
  ------------------
  336|  15.1k|}
jsonnet_make:
  339|  7.58k|{
  340|  7.58k|    TRY
  ------------------
  |  |  319|  7.58k|#define TRY try {
  ------------------
  341|  7.58k|        return new JsonnetVm();
  342|  7.58k|    CATCH("jsonnet_make")
  ------------------
  |  |  321|  7.58k|    }                                                                                         \
  |  |  322|  7.58k|    catch (const std::bad_alloc &)                                                            \
  |  |  323|  7.58k|    {                                                                                         \
  |  |  324|      0|        memory_panic();                                                                       \
  |  |  325|      0|    }                                                                                         \
  |  |  326|  7.58k|    catch (const std::exception &e)                                                           \
  |  |  327|  7.58k|    {                                                                                         \
  |  |  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|  7.58k|}
jsonnet_destroy:
  347|  7.58k|{
  348|  7.58k|    TRY
  ------------------
  |  |  319|  7.58k|#define TRY try {
  ------------------
  349|  7.58k|        delete vm;
  350|  7.58k|    CATCH("jsonnet_destroy")
  ------------------
  |  |  321|  7.58k|    }                                                                                         \
  |  |  322|  7.58k|    catch (const std::bad_alloc &)                                                            \
  |  |  323|  7.58k|    {                                                                                         \
  |  |  324|      0|        memory_panic();                                                                       \
  |  |  325|      0|    }                                                                                         \
  |  |  326|  7.58k|    catch (const std::exception &e)                                                           \
  |  |  327|  7.58k|    {                                                                                         \
  |  |  328|      0|        std::cerr << "Something went wrong during " func ", please report this: " << e.what() \
  |  |  329|      0|                  << std::endl;                                                               \
  |  |  330|      0|        abort();                                                                              \
  |  |  331|      0|    }
  ------------------
  351|  7.58k|}
jsonnet_import_callback:
  379|  7.58k|{
  380|  7.58k|    vm->importCallback = cb;
  381|  7.58k|    vm->importCallbackContext = ctx;
  382|  7.58k|}
jsonnet_evaluate_snippet_multi:
  738|  7.58k|{
  739|  7.58k|    TRY
  ------------------
  |  |  319|  7.58k|#define TRY try {
  ------------------
  740|  7.58k|        return jsonnet_evaluate_snippet_aux(vm, filename, snippet, error, MULTI);
  741|  7.58k|    CATCH("jsonnet_evaluate_snippet_multi")
  ------------------
  |  |  321|  7.58k|    }                                                                                         \
  |  |  322|  7.58k|    catch (const std::bad_alloc &)                                                            \
  |  |  323|  7.58k|    {                                                                                         \
  |  |  324|      0|        memory_panic();                                                                       \
  |  |  325|      0|    }                                                                                         \
  |  |  326|  7.58k|    catch (const std::exception &e)                                                           \
  |  |  327|  7.58k|    {                                                                                         \
  |  |  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|  7.58k|}
jsonnet_realloc:
  755|  14.6k|{
  756|  14.6k|    (void)vm;
  757|  14.6k|    if (str == nullptr) {
  ------------------
  |  Branch (757:9): [True: 7.05k, False: 7.58k]
  ------------------
  758|  7.05k|        if (sz == 0)
  ------------------
  |  Branch (758:13): [True: 0, False: 7.05k]
  ------------------
  759|      0|            return nullptr;
  760|  7.05k|        auto *r = static_cast<char *>(::malloc(sz));
  761|  7.05k|        if (r == nullptr)
  ------------------
  |  Branch (761:13): [True: 0, False: 7.05k]
  ------------------
  762|      0|            memory_panic();
  763|  7.05k|        return r;
  764|  7.58k|    } else {
  765|  7.58k|        if (sz == 0) {
  ------------------
  |  Branch (765:13): [True: 7.58k, False: 0]
  ------------------
  766|  7.58k|            ::free(str);
  767|  7.58k|            return nullptr;
  768|  7.58k|        } 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|  7.58k|    }
  775|  14.6k|}
_ZN9JsonnetVmC2Ev:
  228|  7.58k|        : gcGrowthTrigger(2.0),
  229|  7.58k|          maxStack(500),
  230|  7.58k|          gcMinObjects(1000),
  231|  7.58k|          maxTrace(20),
  232|  7.58k|          importCallback(default_import_callback),
  233|  7.58k|          importCallbackContext(this),
  234|  7.58k|          stringOutput(false),
  235|  7.58k|          trailingNewline(true),
  236|  7.58k|          fmtDebugDesugaring(false)
  237|  7.58k|    {
  238|  7.58k|        jpaths.emplace_back("/usr/share/jsonnet-" + std::string(jsonnet_version()) + "/");
  239|  7.58k|        jpaths.emplace_back("/usr/local/share/jsonnet-" + std::string(jsonnet_version()) + "/");
  240|  7.58k|    }
libjsonnet.cpp:_ZL11from_stringP9JsonnetVmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   90|  7.05k|{
   91|  7.05k|    char *r = jsonnet_realloc(vm, nullptr, v.length() + 1);
   92|  7.05k|    std::memcpy(r, v.c_str(), v.length() + 1);
   93|  7.05k|    return r;
   94|  7.05k|}
libjsonnet.cpp:_ZL28jsonnet_evaluate_snippet_auxP9JsonnetVmPKcS2_PiN12_GLOBAL__N_18EvalKindE:
  541|  7.58k|{
  542|  7.58k|    try {
  543|  7.58k|        Allocator alloc;
  544|  7.58k|        AST *expr;
  545|  7.58k|        Tokens tokens = jsonnet_lex(filename, snippet);
  546|       |
  547|  7.58k|        expr = jsonnet_parse(&alloc, tokens);
  548|       |
  549|  7.58k|        jsonnet_desugar(&alloc, expr, &vm->tla);
  550|       |
  551|  7.58k|        unsigned max_stack = vm->maxStack;
  552|       |
  553|       |        // For the stdlib desugaring.
  554|  7.58k|        max_stack++;
  555|       |
  556|       |        // For the TLA desugaring.
  557|  7.58k|        max_stack++;
  558|       |
  559|  7.58k|        jsonnet_static_analysis(expr);
  560|  7.58k|        switch (kind) {
  561|      0|            case REGULAR: {
  ------------------
  |  Branch (561:13): [True: 0, False: 7.58k]
  ------------------
  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|  3.57k|            case MULTI: {
  ------------------
  |  Branch (579:13): [True: 3.57k, False: 4.00k]
  ------------------
  580|  3.57k|                std::map<std::string, std::string> files =
  581|  3.57k|                    jsonnet_vm_execute_multi(&alloc,
  582|  3.57k|                                             expr,
  583|  3.57k|                                             vm->ext,
  584|  3.57k|                                             max_stack,
  585|  3.57k|                                             vm->gcMinObjects,
  586|  3.57k|                                             vm->gcGrowthTrigger,
  587|  3.57k|                                             vm->nativeCallbacks,
  588|  3.57k|                                             vm->importCallback,
  589|  3.57k|                                             vm->importCallbackContext,
  590|  3.57k|                                             vm->stringOutput);
  591|  3.57k|                size_t sz = 1;  // final sentinel
  592|  4.02k|                for (const auto &pair : files) {
  ------------------
  |  Branch (592:39): [True: 4.02k, False: 3.57k]
  ------------------
  593|  4.02k|                    sz += pair.first.length() + 1;   // include sentinel
  594|  4.02k|                    sz += pair.second.length() + 2;  // Add a '\n' as well as sentinel
  595|  4.02k|                }
  596|  3.57k|                char *buf = (char *)::malloc(sz);
  597|  3.57k|                if (buf == nullptr)
  ------------------
  |  Branch (597:21): [True: 0, False: 3.57k]
  ------------------
  598|      0|                    memory_panic();
  599|  3.57k|                std::ptrdiff_t i = 0;
  600|  4.02k|                for (const auto &pair : files) {
  ------------------
  |  Branch (600:39): [True: 4.02k, False: 3.57k]
  ------------------
  601|  4.02k|                    memcpy(&buf[i], pair.first.c_str(), pair.first.length() + 1);
  602|  4.02k|                    i += pair.first.length() + 1;
  603|  4.02k|                    memcpy(&buf[i], pair.second.c_str(), pair.second.length());
  604|  4.02k|                    i += pair.second.length();
  605|  4.02k|                    if (vm->trailingNewline) {
  ------------------
  |  Branch (605:25): [True: 4.02k, False: 0]
  ------------------
  606|  4.02k|                        buf[i] = '\n';
  607|  4.02k|                        i++;
  608|  4.02k|                    }
  609|  4.02k|                    buf[i] = '\0';
  610|  4.02k|                    i++;
  611|  4.02k|                }
  612|  3.57k|                buf[i] = '\0';  // final sentinel
  613|  3.57k|                *error = false;
  614|  3.57k|                return buf;
  615|      0|            } break;
  616|       |
  617|      0|            case STREAM: {
  ------------------
  |  Branch (617:13): [True: 0, False: 7.58k]
  ------------------
  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: 7.58k]
  ------------------
  655|      0|                fputs("INTERNAL ERROR: bad value of 'kind', probably memory corruption.\n", stderr);
  656|      0|                abort();
  657|  7.58k|        }
  658|       |
  659|  7.58k|    } catch (StaticError &e) {
  660|  4.00k|        std::stringstream ss;
  661|  4.00k|        ss << "STATIC ERROR: " << e << std::endl;
  662|  4.00k|        *error = true;
  663|  4.00k|        return from_string(vm, ss.str());
  664|       |
  665|  4.00k|    } catch (RuntimeError &e) {
  666|  3.05k|        std::stringstream ss;
  667|  3.05k|        ss << "RUNTIME ERROR: " << e.msg << std::endl;
  668|  3.05k|        const long max_above = vm->maxTrace / 2;
  669|  3.05k|        const long max_below = vm->maxTrace - max_above;
  670|  3.05k|        const long sz = e.stackTrace.size();
  671|   289k|        for (long i = 0; i < sz; ++i) {
  ------------------
  |  Branch (671:26): [True: 285k, False: 3.05k]
  ------------------
  672|   285k|            const auto &f = e.stackTrace[i];
  673|   285k|            if (vm->maxTrace > 0 && i >= max_above && i < sz - max_below) {
  ------------------
  |  Branch (673:17): [True: 285k, False: 0]
  |  Branch (673:37): [True: 272k, False: 13.5k]
  |  Branch (673:55): [True: 264k, False: 8.18k]
  ------------------
  674|   264k|                if (i == max_above)
  ------------------
  |  Branch (674:21): [True: 712, False: 263k]
  ------------------
  675|    712|                    ss << "\t..." << std::endl;
  676|   264k|            } else {
  677|  21.7k|                ss << "\t" << f.location << "\t" << f.name << std::endl;
  678|  21.7k|            }
  679|   285k|        }
  680|  3.05k|        *error = true;
  681|  3.05k|        return from_string(vm, ss.str());
  682|  3.05k|    }
  683|       |
  684|      0|    return nullptr;  // Quiet, compiler.
  685|  7.58k|}

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

_ZN7jsonnet8internal12CompilerPass6fodderERNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEE:
   22|  27.9M|{
   23|  27.9M|    for (auto &f : fodder)
  ------------------
  |  Branch (23:18): [True: 305k, False: 27.9M]
  ------------------
   24|   305k|        fodderElement(f);
   25|  27.9M|}
_ZN7jsonnet8internal12CompilerPass6paramsERNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEERNS3_INS0_8ArgParamENS5_IS9_EEEES8_:
   43|   841k|{
   44|   841k|    fodder(fodder_l);
   45|  1.90M|    for (auto &param : params) {
  ------------------
  |  Branch (45:22): [True: 1.90M, False: 841k]
  ------------------
   46|  1.90M|        fodder(param.idFodder);
   47|  1.90M|        if (param.expr) {
  ------------------
  |  Branch (47:13): [True: 1.00M, False: 893k]
  ------------------
   48|  1.00M|            fodder(param.eqFodder);
   49|  1.00M|            expr(param.expr);
   50|  1.00M|        }
   51|  1.90M|        fodder(param.commaFodder);
   52|  1.90M|    }
   53|   841k|    fodder(fodder_r);
   54|   841k|}
_ZN7jsonnet8internal12CompilerPass4exprERPNS0_3ASTE:
  110|  13.9M|{
  111|  13.9M|    fodder(ast_->openFodder);
  112|  13.9M|    visitExpr(ast_);
  113|  13.9M|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ApplyE:
  116|   545k|{
  117|   545k|    expr(ast->target);
  118|   545k|    params(ast->fodderL, ast->args, ast->fodderR);
  119|   545k|    if (ast->tailstrict) {
  ------------------
  |  Branch (119:9): [True: 292k, False: 252k]
  ------------------
  120|   292k|        fodder(ast->tailstrictFodder);
  121|   292k|    }
  122|   545k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ArrayE:
  131|   233k|{
  132|   251k|    for (auto &element : ast->elements) {
  ------------------
  |  Branch (132:24): [True: 251k, False: 233k]
  ------------------
  133|   251k|        expr(element.expr);
  134|   251k|        fodder(element.commaFodder);
  135|   251k|    }
  136|   233k|    fodder(ast->closeFodder);
  137|   233k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_6BinaryE:
  159|  1.32M|{
  160|  1.32M|    expr(ast->left);
  161|  1.32M|    fodder(ast->opFodder);
  162|  1.32M|    expr(ast->right);
  163|  1.32M|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_11ConditionalE:
  166|   551k|{
  167|   551k|    expr(ast->cond);
  168|   551k|    fodder(ast->thenFodder);
  169|   551k|    if (ast->branchFalse != nullptr) {
  ------------------
  |  Branch (169:9): [True: 551k, False: 0]
  ------------------
  170|   551k|        expr(ast->branchTrue);
  171|   551k|        fodder(ast->elseFodder);
  172|   551k|        expr(ast->branchFalse);
  173|   551k|    } else {
  174|      0|        expr(ast->branchTrue);
  175|      0|    }
  176|   551k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ErrorE:
  179|   142k|{
  180|   142k|    expr(ast->expr);
  181|   142k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_8FunctionE:
  184|   296k|{
  185|   296k|    params(ast->parenLeftFodder, ast->params, ast->parenRightFodder);
  186|   296k|    expr(ast->body);
  187|   296k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_6ImportE:
  190|    649|{
  191|    649|    visit(ast->file);
  192|    649|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_9ImportstrE:
  195|  5.18k|{
  196|  5.18k|    visit(ast->file);
  197|  5.18k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_9ImportbinE:
  200|  1.23k|{
  201|  1.23k|    visit(ast->file);
  202|  1.23k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_7InSuperE:
  205|   200k|{
  206|   200k|    expr(ast->element);
  207|   200k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5IndexE:
  210|   627k|{
  211|   627k|    expr(ast->target);
  212|   627k|    if (ast->id != nullptr) {
  ------------------
  |  Branch (212:9): [True: 0, False: 627k]
  ------------------
  213|   627k|    } else {
  214|   627k|        if (ast->isSlice) {
  ------------------
  |  Branch (214:13): [True: 0, False: 627k]
  ------------------
  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|   627k|        } else {
  222|   627k|            expr(ast->index);
  223|   627k|        }
  224|   627k|    }
  225|   627k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5LocalE:
  228|   342k|{
  229|   342k|    assert(ast->binds.size() > 0);
  ------------------
  |  Branch (229:5): [True: 342k, False: 0]
  ------------------
  230|  1.41M|    for (auto &bind : ast->binds) {
  ------------------
  |  Branch (230:21): [True: 1.41M, False: 342k]
  ------------------
  231|  1.41M|        fodder(bind.varFodder);
  232|  1.41M|        if (bind.functionSugar) {
  ------------------
  |  Branch (232:13): [True: 0, False: 1.41M]
  ------------------
  233|      0|            params(bind.parenLeftFodder, bind.params, bind.parenRightFodder);
  234|      0|        }
  235|  1.41M|        fodder(bind.opFodder);
  236|  1.41M|        expr(bind.body);
  237|  1.41M|        fodder(bind.closeFodder);
  238|  1.41M|    }
  239|   342k|    expr(ast->body);
  240|   342k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_15DesugaredObjectE:
  249|  1.05M|{
  250|  1.05M|    for (AST *assert : ast->asserts) {
  ------------------
  |  Branch (250:22): [True: 23.1k, False: 1.05M]
  ------------------
  251|  23.1k|        expr(assert);
  252|  23.1k|    }
  253|  1.05M|    for (auto &field : ast->fields) {
  ------------------
  |  Branch (253:22): [True: 831k, False: 1.05M]
  ------------------
  254|   831k|        expr(field.name);
  255|   831k|        expr(field.body);
  256|   831k|    }
  257|  1.05M|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_25ObjectComprehensionSimpleE:
  267|  55.3k|{
  268|  55.3k|    expr(ast->field);
  269|  55.3k|    expr(ast->value);
  270|  55.3k|    expr(ast->array);
  271|  55.3k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_10SuperIndexE:
  280|   201k|{
  281|   201k|    if (ast->id != nullptr) {
  ------------------
  |  Branch (281:9): [True: 0, False: 201k]
  ------------------
  282|   201k|    } else {
  283|   201k|        expr(ast->index);
  284|   201k|    }
  285|   201k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5UnaryE:
  288|  2.11M|{
  289|  2.11M|    expr(ast->expr);
  290|  2.11M|}
_ZN7jsonnet8internal12CompilerPass9visitExprERPNS0_3ASTE:
  300|  13.9M|{
  301|  13.9M|    switch(ast_->type) {
  302|   545k|        VISIT(ast_, AST_APPLY, Apply);
  ------------------
  |  |  293|   545k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 545k, False: 13.4M]
  |  |  ------------------
  |  |  294|   545k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   545k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   545k|     visit(ast); \
  |  |  297|   545k|   } break
  ------------------
  |  Branch (302:9): [True: 545k, False: 0]
  ------------------
  303|      0|        VISIT(ast_, AST_APPLY_BRACE, ApplyBrace);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 13.9M]
  |  |  ------------------
  |  |  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|   233k|        VISIT(ast_, AST_ARRAY, Array);
  ------------------
  |  |  293|   233k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 233k, False: 13.7M]
  |  |  ------------------
  |  |  294|   233k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   233k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   233k|     visit(ast); \
  |  |  297|   233k|   } break
  ------------------
  |  Branch (304:9): [True: 233k, False: 0]
  ------------------
  305|      0|        VISIT(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehension);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 13.9M]
  |  |  ------------------
  |  |  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: 13.9M]
  |  |  ------------------
  |  |  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|  1.32M|        VISIT(ast_, AST_BINARY, Binary);
  ------------------
  |  |  293|  1.32M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.32M, False: 12.6M]
  |  |  ------------------
  |  |  294|  1.32M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.32M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.32M|     visit(ast); \
  |  |  297|  1.32M|   } break
  ------------------
  |  Branch (308:9): [True: 1.32M, False: 0]
  ------------------
  309|      0|        VISIT(ast_, AST_BUILTIN_FUNCTION, BuiltinFunction);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 13.9M]
  |  |  ------------------
  |  |  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: 13.9M]
  |  |  ------------------
  |  |  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|   551k|        VISIT(ast_, AST_CONDITIONAL, Conditional);
  ------------------
  |  |  293|   551k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 551k, False: 13.4M]
  |  |  ------------------
  |  |  294|   551k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   551k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   551k|     visit(ast); \
  |  |  297|   551k|   } break
  ------------------
  |  Branch (311:9): [True: 551k, False: 0]
  ------------------
  312|  1.05M|        VISIT(ast_, AST_DESUGARED_OBJECT, DesugaredObject);
  ------------------
  |  |  293|  1.05M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.05M, False: 12.9M]
  |  |  ------------------
  |  |  294|  1.05M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.05M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.05M|     visit(ast); \
  |  |  297|  1.05M|   } break
  ------------------
  |  Branch (312:9): [True: 1.05M, False: 0]
  ------------------
  313|      0|        VISIT(ast_, AST_DOLLAR, Dollar);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 13.9M]
  |  |  ------------------
  |  |  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|   142k|        VISIT(ast_, AST_ERROR, Error);
  ------------------
  |  |  293|   142k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 142k, False: 13.8M]
  |  |  ------------------
  |  |  294|   142k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   142k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   142k|     visit(ast); \
  |  |  297|   142k|   } break
  ------------------
  |  Branch (314:9): [True: 142k, False: 0]
  ------------------
  315|   296k|        VISIT(ast_, AST_FUNCTION, Function);
  ------------------
  |  |  293|   296k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 296k, False: 13.6M]
  |  |  ------------------
  |  |  294|   296k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   296k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   296k|     visit(ast); \
  |  |  297|   296k|   } break
  ------------------
  |  Branch (315:9): [True: 296k, False: 0]
  ------------------
  316|    649|        VISIT(ast_, AST_IMPORT, Import);
  ------------------
  |  |  293|    649|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 649, False: 13.9M]
  |  |  ------------------
  |  |  294|    649|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|    649|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|    649|     visit(ast); \
  |  |  297|    649|   } break
  ------------------
  |  Branch (316:9): [True: 649, False: 0]
  ------------------
  317|  5.18k|        VISIT(ast_, AST_IMPORTSTR, Importstr);
  ------------------
  |  |  293|  5.18k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 5.18k, False: 13.9M]
  |  |  ------------------
  |  |  294|  5.18k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  5.18k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  5.18k|     visit(ast); \
  |  |  297|  5.18k|   } break
  ------------------
  |  Branch (317:9): [True: 5.18k, False: 0]
  ------------------
  318|  1.23k|        VISIT(ast_, AST_IMPORTBIN, Importbin);
  ------------------
  |  |  293|  1.23k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.23k, False: 13.9M]
  |  |  ------------------
  |  |  294|  1.23k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.23k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.23k|     visit(ast); \
  |  |  297|  1.23k|   } break
  ------------------
  |  Branch (318:9): [True: 1.23k, False: 0]
  ------------------
  319|   627k|        VISIT(ast_, AST_INDEX, Index);
  ------------------
  |  |  293|   627k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 627k, False: 13.3M]
  |  |  ------------------
  |  |  294|   627k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   627k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   627k|     visit(ast); \
  |  |  297|   627k|   } break
  ------------------
  |  Branch (319:9): [True: 627k, False: 0]
  ------------------
  320|   200k|        VISIT(ast_, AST_IN_SUPER, InSuper);
  ------------------
  |  |  293|   200k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 200k, False: 13.7M]
  |  |  ------------------
  |  |  294|   200k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   200k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   200k|     visit(ast); \
  |  |  297|   200k|   } break
  ------------------
  |  Branch (320:9): [True: 200k, False: 0]
  ------------------
  321|  24.0k|        VISIT(ast_, AST_LITERAL_BOOLEAN, LiteralBoolean);
  ------------------
  |  |  293|  24.0k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 24.0k, False: 13.9M]
  |  |  ------------------
  |  |  294|  24.0k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  24.0k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  24.0k|     visit(ast); \
  |  |  297|  24.0k|   } break
  ------------------
  |  Branch (321:9): [True: 24.0k, False: 0]
  ------------------
  322|  24.0k|        VISIT(ast_, AST_LITERAL_NULL, LiteralNull);
  ------------------
  |  |  293|  24.0k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 24.0k, False: 13.9M]
  |  |  ------------------
  |  |  294|  24.0k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  24.0k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  24.0k|     visit(ast); \
  |  |  297|  24.0k|   } break
  ------------------
  |  Branch (322:9): [True: 24.0k, False: 0]
  ------------------
  323|  1.02M|        VISIT(ast_, AST_LITERAL_NUMBER, LiteralNumber);
  ------------------
  |  |  293|  1.02M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.02M, False: 12.9M]
  |  |  ------------------
  |  |  294|  1.02M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.02M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.02M|     visit(ast); \
  |  |  297|  1.02M|   } break
  ------------------
  |  Branch (323:9): [True: 1.02M, False: 0]
  ------------------
  324|  2.17M|        VISIT(ast_, AST_LITERAL_STRING, LiteralString);
  ------------------
  |  |  293|  2.17M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 2.17M, False: 11.8M]
  |  |  ------------------
  |  |  294|  2.17M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  2.17M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  2.17M|     visit(ast); \
  |  |  297|  2.17M|   } break
  ------------------
  |  Branch (324:9): [True: 2.17M, False: 0]
  ------------------
  325|   342k|        VISIT(ast_, AST_LOCAL, Local);
  ------------------
  |  |  293|   342k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 342k, False: 13.6M]
  |  |  ------------------
  |  |  294|   342k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   342k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   342k|     visit(ast); \
  |  |  297|   342k|   } break
  ------------------
  |  Branch (325:9): [True: 342k, False: 0]
  ------------------
  326|      0|        VISIT(ast_, AST_OBJECT, Object);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 13.9M]
  |  |  ------------------
  |  |  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: 13.9M]
  |  |  ------------------
  |  |  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|  55.3k|        VISIT(ast_, AST_OBJECT_COMPREHENSION_SIMPLE, ObjectComprehensionSimple);
  ------------------
  |  |  293|  55.3k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 55.3k, False: 13.9M]
  |  |  ------------------
  |  |  294|  55.3k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  55.3k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  55.3k|     visit(ast); \
  |  |  297|  55.3k|   } break
  ------------------
  |  Branch (328:9): [True: 55.3k, False: 0]
  ------------------
  329|      0|        VISIT(ast_, AST_PARENS, Parens);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 13.9M]
  |  |  ------------------
  |  |  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|  11.4k|        VISIT(ast_, AST_SELF, Self);
  ------------------
  |  |  293|  11.4k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 11.4k, False: 13.9M]
  |  |  ------------------
  |  |  294|  11.4k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  11.4k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  11.4k|     visit(ast); \
  |  |  297|  11.4k|   } break
  ------------------
  |  Branch (330:9): [True: 11.4k, False: 0]
  ------------------
  331|   201k|        VISIT(ast_, AST_SUPER_INDEX, SuperIndex);
  ------------------
  |  |  293|   201k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 201k, False: 13.7M]
  |  |  ------------------
  |  |  294|   201k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   201k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   201k|     visit(ast); \
  |  |  297|   201k|   } break
  ------------------
  |  Branch (331:9): [True: 201k, False: 0]
  ------------------
  332|  2.11M|        VISIT(ast_, AST_UNARY, Unary);
  ------------------
  |  |  293|  2.11M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 2.11M, False: 11.8M]
  |  |  ------------------
  |  |  294|  2.11M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  2.11M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  2.11M|     visit(ast); \
  |  |  297|  2.11M|   } break
  ------------------
  |  Branch (332:9): [True: 2.11M, False: 0]
  ------------------
  333|  3.04M|        VISIT(ast_, AST_VAR, Var);
  ------------------
  |  |  293|  3.04M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 3.04M, False: 10.9M]
  |  |  ------------------
  |  |  294|  3.04M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  3.04M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  3.04M|     visit(ast); \
  |  |  297|  3.04M|   } break
  ------------------
  |  Branch (333:9): [True: 3.04M, False: 0]
  ------------------
  334|      0|        default:
  ------------------
  |  Branch (334:9): [True: 0, False: 13.9M]
  ------------------
  335|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  336|      0|            std::abort();
  337|      0|            break;
  338|  13.9M|    }
  339|  13.9M|}
_ZN7jsonnet8internal9ClonePass4exprERPNS0_3ASTE:
  362|  12.4M|{
  363|  12.4M|    switch(ast_->type) {
  364|   481k|        CLONE(ast_, AST_APPLY, Apply);
  ------------------
  |  |  355|   481k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 481k, False: 12.0M]
  |  |  ------------------
  |  |  356|   481k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   481k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   481k|     var = alloc.clone(ast); \
  |  |  359|   481k|   } break
  ------------------
  |  Branch (364:9): [True: 481k, False: 0]
  ------------------
  365|      0|        CLONE(ast_, AST_APPLY_BRACE, ApplyBrace);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 12.4M]
  |  |  ------------------
  |  |  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|   210k|        CLONE(ast_, AST_ARRAY, Array);
  ------------------
  |  |  355|   210k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 210k, False: 12.2M]
  |  |  ------------------
  |  |  356|   210k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   210k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   210k|     var = alloc.clone(ast); \
  |  |  359|   210k|   } break
  ------------------
  |  Branch (366:9): [True: 210k, False: 0]
  ------------------
  367|      0|        CLONE(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehension);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 12.4M]
  |  |  ------------------
  |  |  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: 12.4M]
  |  |  ------------------
  |  |  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|  1.17M|        CLONE(ast_, AST_BINARY, Binary);
  ------------------
  |  |  355|  1.17M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.17M, False: 11.3M]
  |  |  ------------------
  |  |  356|  1.17M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.17M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.17M|     var = alloc.clone(ast); \
  |  |  359|  1.17M|   } break
  ------------------
  |  Branch (370:9): [True: 1.17M, False: 0]
  ------------------
  371|      0|        CLONE(ast_, AST_BUILTIN_FUNCTION, BuiltinFunction);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 12.4M]
  |  |  ------------------
  |  |  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|   505k|        CLONE(ast_, AST_CONDITIONAL, Conditional);
  ------------------
  |  |  355|   505k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 505k, False: 11.9M]
  |  |  ------------------
  |  |  356|   505k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   505k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   505k|     var = alloc.clone(ast); \
  |  |  359|   505k|   } break
  ------------------
  |  Branch (372:9): [True: 505k, False: 0]
  ------------------
  373|   948k|        CLONE(ast_, AST_DESUGARED_OBJECT, DesugaredObject);
  ------------------
  |  |  355|   948k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 948k, False: 11.5M]
  |  |  ------------------
  |  |  356|   948k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   948k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   948k|     var = alloc.clone(ast); \
  |  |  359|   948k|   } break
  ------------------
  |  Branch (373:9): [True: 948k, False: 0]
  ------------------
  374|      0|        CLONE(ast_, AST_DOLLAR, Dollar);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 12.4M]
  |  |  ------------------
  |  |  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|   128k|        CLONE(ast_, AST_ERROR, Error);
  ------------------
  |  |  355|   128k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 128k, False: 12.3M]
  |  |  ------------------
  |  |  356|   128k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   128k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   128k|     var = alloc.clone(ast); \
  |  |  359|   128k|   } break
  ------------------
  |  Branch (375:9): [True: 128k, False: 0]
  ------------------
  376|   254k|        CLONE(ast_, AST_FUNCTION, Function);
  ------------------
  |  |  355|   254k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 254k, False: 12.2M]
  |  |  ------------------
  |  |  356|   254k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   254k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   254k|     var = alloc.clone(ast); \
  |  |  359|   254k|   } break
  ------------------
  |  Branch (376:9): [True: 254k, False: 0]
  ------------------
  377|    575|        CLONE(ast_, AST_IMPORT, Import);
  ------------------
  |  |  355|    575|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 575, False: 12.4M]
  |  |  ------------------
  |  |  356|    575|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|    575|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|    575|     var = alloc.clone(ast); \
  |  |  359|    575|   } break
  ------------------
  |  Branch (377:9): [True: 575, False: 0]
  ------------------
  378|  3.98k|        CLONE(ast_, AST_IMPORTSTR, Importstr);
  ------------------
  |  |  355|  3.98k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 3.98k, False: 12.4M]
  |  |  ------------------
  |  |  356|  3.98k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  3.98k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  3.98k|     var = alloc.clone(ast); \
  |  |  359|  3.98k|   } break
  ------------------
  |  Branch (378:9): [True: 3.98k, False: 0]
  ------------------
  379|    832|        CLONE(ast_, AST_IMPORTBIN, Importbin);
  ------------------
  |  |  355|    832|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 832, False: 12.4M]
  |  |  ------------------
  |  |  356|    832|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|    832|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|    832|     var = alloc.clone(ast); \
  |  |  359|    832|   } break
  ------------------
  |  Branch (379:9): [True: 832, False: 0]
  ------------------
  380|   555k|        CLONE(ast_, AST_INDEX, Index);
  ------------------
  |  |  355|   555k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 555k, False: 11.9M]
  |  |  ------------------
  |  |  356|   555k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   555k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   555k|     var = alloc.clone(ast); \
  |  |  359|   555k|   } break
  ------------------
  |  Branch (380:9): [True: 555k, False: 0]
  ------------------
  381|   200k|        CLONE(ast_, AST_IN_SUPER, InSuper);
  ------------------
  |  |  355|   200k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 200k, False: 12.2M]
  |  |  ------------------
  |  |  356|   200k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   200k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   200k|     var = alloc.clone(ast); \
  |  |  359|   200k|   } break
  ------------------
  |  Branch (381:9): [True: 200k, False: 0]
  ------------------
  382|  23.0k|        CLONE(ast_, AST_LITERAL_BOOLEAN, LiteralBoolean);
  ------------------
  |  |  355|  23.0k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 23.0k, False: 12.4M]
  |  |  ------------------
  |  |  356|  23.0k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  23.0k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  23.0k|     var = alloc.clone(ast); \
  |  |  359|  23.0k|   } break
  ------------------
  |  Branch (382:9): [True: 23.0k, False: 0]
  ------------------
  383|  19.4k|        CLONE(ast_, AST_LITERAL_NULL, LiteralNull);
  ------------------
  |  |  355|  19.4k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 19.4k, False: 12.4M]
  |  |  ------------------
  |  |  356|  19.4k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  19.4k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  19.4k|     var = alloc.clone(ast); \
  |  |  359|  19.4k|   } break
  ------------------
  |  Branch (383:9): [True: 19.4k, False: 0]
  ------------------
  384|   902k|        CLONE(ast_, AST_LITERAL_NUMBER, LiteralNumber);
  ------------------
  |  |  355|   902k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 902k, False: 11.5M]
  |  |  ------------------
  |  |  356|   902k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   902k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   902k|     var = alloc.clone(ast); \
  |  |  359|   902k|   } break
  ------------------
  |  Branch (384:9): [True: 902k, False: 0]
  ------------------
  385|  1.98M|        CLONE(ast_, AST_LITERAL_STRING, LiteralString);
  ------------------
  |  |  355|  1.98M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.98M, False: 10.5M]
  |  |  ------------------
  |  |  356|  1.98M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.98M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.98M|     var = alloc.clone(ast); \
  |  |  359|  1.98M|   } break
  ------------------
  |  Branch (385:9): [True: 1.98M, False: 0]
  ------------------
  386|   317k|        CLONE(ast_, AST_LOCAL, Local);
  ------------------
  |  |  355|   317k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 317k, False: 12.1M]
  |  |  ------------------
  |  |  356|   317k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   317k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   317k|     var = alloc.clone(ast); \
  |  |  359|   317k|   } break
  ------------------
  |  Branch (386:9): [True: 317k, False: 0]
  ------------------
  387|      0|        CLONE(ast_, AST_OBJECT, Object);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 12.4M]
  |  |  ------------------
  |  |  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: 12.4M]
  |  |  ------------------
  |  |  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|  48.5k|        CLONE(ast_, AST_OBJECT_COMPREHENSION_SIMPLE, ObjectComprehensionSimple);
  ------------------
  |  |  355|  48.5k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 48.5k, False: 12.4M]
  |  |  ------------------
  |  |  356|  48.5k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  48.5k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  48.5k|     var = alloc.clone(ast); \
  |  |  359|  48.5k|   } break
  ------------------
  |  Branch (389:9): [True: 48.5k, False: 0]
  ------------------
  390|      0|        CLONE(ast_, AST_PARENS, Parens);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 12.4M]
  |  |  ------------------
  |  |  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|  11.4k|        CLONE(ast_, AST_SELF, Self);
  ------------------
  |  |  355|  11.4k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 11.4k, False: 12.4M]
  |  |  ------------------
  |  |  356|  11.4k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  11.4k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  11.4k|     var = alloc.clone(ast); \
  |  |  359|  11.4k|   } break
  ------------------
  |  Branch (391:9): [True: 11.4k, False: 0]
  ------------------
  392|   201k|        CLONE(ast_, AST_SUPER_INDEX, SuperIndex);
  ------------------
  |  |  355|   201k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 201k, False: 12.2M]
  |  |  ------------------
  |  |  356|   201k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   201k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   201k|     var = alloc.clone(ast); \
  |  |  359|   201k|   } break
  ------------------
  |  Branch (392:9): [True: 201k, False: 0]
  ------------------
  393|  1.85M|        CLONE(ast_, AST_UNARY, Unary);
  ------------------
  |  |  355|  1.85M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.85M, False: 10.6M]
  |  |  ------------------
  |  |  356|  1.85M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.85M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.85M|     var = alloc.clone(ast); \
  |  |  359|  1.85M|   } break
  ------------------
  |  Branch (393:9): [True: 1.85M, False: 0]
  ------------------
  394|  2.66M|        CLONE(ast_, AST_VAR, Var);
  ------------------
  |  |  355|  2.66M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 2.66M, False: 9.82M]
  |  |  ------------------
  |  |  356|  2.66M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  2.66M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  2.66M|     var = alloc.clone(ast); \
  |  |  359|  2.66M|   } break
  ------------------
  |  Branch (394:9): [True: 2.66M, False: 0]
  ------------------
  395|      0|        default:
  ------------------
  |  Branch (395:9): [True: 0, False: 12.4M]
  ------------------
  396|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  397|      0|            std::abort();
  398|      0|            break;
  399|  12.4M|    }
  400|       |
  401|  12.4M|    CompilerPass::expr(ast_);
  402|  12.4M|}
_ZN7jsonnet8internal9clone_astERNS0_9AllocatorEPNS0_3ASTE:
  405|  51.5k|{
  406|  51.5k|    AST *r = ast;
  407|  51.5k|    ClonePass(alloc).expr(r);
  408|  51.5k|    return r;
  409|  51.5k|}
_ZN7jsonnet8internal9ClonePassC2ERNS0_9AllocatorE:
  350|  51.5k|    ClonePass(Allocator &alloc) : CompilerPass(alloc) {}

_ZN7jsonnet8internal12CompilerPassC2ERNS0_9AllocatorE:
   32|  68.6k|    CompilerPass(Allocator &alloc) : alloc(alloc) {}
_ZN7jsonnet8internal12CompilerPass13fodderElementERNS0_13FodderElementE:
   34|   305k|    virtual void fodderElement(FodderElement &) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_14LiteralBooleanE:
   84|  24.0k|    virtual void visit(LiteralBoolean *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_13LiteralNumberE:
   86|  1.02M|    virtual void visit(LiteralNumber *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_11LiteralNullE:
   90|  24.0k|    virtual void visit(LiteralNull *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_4SelfE:
  102|  11.4k|    virtual void visit(Self *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_3VarE:
  108|  3.04M|    virtual void visit(Var *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_13LiteralStringE:
   88|  2.18M|    virtual void visit(LiteralString *) {}

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

vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14HeapC2Ejd:
  346|  3.57k|        : gcTuneMinObjects(gc_tune_min_objects),
  347|  3.57k|          gcTuneGrowthTrigger(gc_tune_growth_trigger),
  348|  3.57k|          lastMark(0),
  349|  3.57k|          lastNumEntities(0),
  350|  3.57k|          numEntities(0)
  351|  3.57k|    {
  352|  3.57k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18type_strENS1_5Value4TypeE:
   76|  1.35k|{
   77|  1.35k|    switch (t) {
   78|      5|        case Value::NULL_TYPE: return "null";
  ------------------
  |  Branch (78:9): [True: 5, False: 1.35k]
  ------------------
   79|    233|        case Value::BOOLEAN: return "boolean";
  ------------------
  |  Branch (79:9): [True: 233, False: 1.12k]
  ------------------
   80|    303|        case Value::NUMBER: return "number";
  ------------------
  |  Branch (80:9): [True: 303, False: 1.05k]
  ------------------
   81|     79|        case Value::ARRAY: return "array";
  ------------------
  |  Branch (81:9): [True: 79, False: 1.27k]
  ------------------
   82|      2|        case Value::FUNCTION: return "function";
  ------------------
  |  Branch (82:9): [True: 2, False: 1.35k]
  ------------------
   83|    158|        case Value::OBJECT: return "object";
  ------------------
  |  Branch (83:9): [True: 158, False: 1.19k]
  ------------------
   84|    576|        case Value::STRING: return "string";
  ------------------
  |  Branch (84:9): [True: 576, False: 780]
  ------------------
   85|      0|        default:
  ------------------
  |  Branch (85:9): [True: 0, False: 1.35k]
  ------------------
   86|      0|            std::cerr << "INTERNAL ERROR: Unknown type: " << t << std::endl;
   87|      0|            std::abort();
   88|      0|            return "";  // Quiet, compiler.
   89|  1.35k|    }
   90|  1.35k|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18type_strERKNS1_5ValueE:
   94|    475|{
   95|    475|    return type_str(v.t);
   96|    475|}
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Value6isHeapEv:
   69|  60.8M|    {
   70|  60.8M|        return t & 0x10;
   71|  60.8M|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_111HeapClosure9isBuiltinEv:
  293|  28.1M|    bool isBuiltin() const { return !this->body || this->body->type == AST_BUILTIN_FUNCTION_BODY; }
  ------------------
  |  Branch (293:37): [True: 0, False: 28.1M]
  |  Branch (293:52): [True: 20.8M, False: 7.26M]
  ------------------
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapThunkC2EPKNS0_10IdentifierEPNS1_10HeapObjectEjPKNS0_3ASTE:
  140|  47.9M|        : HeapEntity(THUNK), filled(false), name(name), self(self), offset(offset), body(body)
  141|  47.9M|    {
  142|  47.9M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapEntityC2ENS2_4TypeE:
   43|  96.9M|    HeapEntity(Type type_) : type(type_) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapEntityD2Ev:
   44|  96.9M|    virtual ~HeapEntity() {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap9checkHeapEv:
  489|  96.9M|    {
  490|  96.9M|        return numEntities > gcTuneMinObjects &&
  ------------------
  |  Branch (490:16): [True: 44.7M, False: 52.1M]
  ------------------
  491|  44.7M|               numEntities > gcTuneGrowthTrigger * lastNumEntities;
  ------------------
  |  Branch (491:16): [True: 102k, False: 44.6M]
  ------------------
  492|  96.9M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromEPNS1_10HeapEntityE:
  369|  90.8M|    {
  370|  90.8M|        assert(from != nullptr);
  ------------------
  |  Branch (370:9): [True: 90.8M, False: 0]
  ------------------
  371|  90.8M|        const GarbageCollectionMark thisMark = lastMark + 1;
  372|  90.8M|        struct State {
  373|  90.8M|            HeapEntity *ent;
  374|  90.8M|            std::vector<HeapEntity *> children;
  375|  90.8M|            State(HeapEntity *ent) : ent(ent) {}
  376|  90.8M|        };
  377|       |
  378|  90.8M|        std::vector<State> stack;
  379|  90.8M|        stack.emplace_back(from);
  380|       |
  381|   403M|        while (stack.size() > 0) {
  ------------------
  |  Branch (381:16): [True: 312M, False: 90.8M]
  ------------------
  382|   312M|            size_t curr_index = stack.size() - 1;
  383|   312M|            State &s = stack[curr_index];
  384|   312M|            HeapEntity *curr = s.ent;
  385|   312M|            if (curr->mark != thisMark) {
  ------------------
  |  Branch (385:17): [True: 78.8M, False: 233M]
  ------------------
  386|  78.8M|                curr->mark = thisMark;
  387|       |
  388|  78.8M|                switch(curr->type) {
  389|  9.74M|                    case HeapEntity::SIMPLE_OBJECT: {
  ------------------
  |  Branch (389:21): [True: 9.74M, False: 69.0M]
  ------------------
  390|  9.74M|                        assert(dynamic_cast<HeapSimpleObject *>(curr));
  ------------------
  |  Branch (390:25): [True: 9.74M, False: 0]
  ------------------
  391|  9.74M|                        auto *obj = static_cast<HeapSimpleObject *>(curr);
  392|  9.74M|                        for (auto upv : obj->upValues)
  ------------------
  |  Branch (392:39): [True: 9.53M, False: 9.74M]
  ------------------
  393|  9.53M|                            addIfHeapEntity(upv.second, s.children);
  394|  9.74M|                        break;
  395|  9.74M|                    }
  396|  5.97M|                    case HeapEntity::EXTENDED_OBJECT: {
  ------------------
  |  Branch (396:21): [True: 5.97M, False: 72.8M]
  ------------------
  397|  5.97M|                        assert(dynamic_cast<HeapExtendedObject *>(curr));
  ------------------
  |  Branch (397:25): [True: 5.97M, False: 0]
  ------------------
  398|  5.97M|                        auto *obj = static_cast<HeapExtendedObject *>(curr);
  399|  5.97M|                        addIfHeapEntity(obj->left, s.children);
  400|  5.97M|                        addIfHeapEntity(obj->right, s.children);
  401|  5.97M|                        break;
  402|  5.97M|                    }
  403|      0|                    case HeapEntity::RESTRICTED_OBJECT: {
  ------------------
  |  Branch (403:21): [True: 0, False: 78.8M]
  ------------------
  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: 78.8M]
  ------------------
  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|  2.40M|                    case HeapEntity::ARRAY: {
  ------------------
  |  Branch (418:21): [True: 2.40M, False: 76.4M]
  ------------------
  419|  2.40M|                        assert(dynamic_cast<HeapArray *>(curr));
  ------------------
  |  Branch (419:25): [True: 2.40M, False: 0]
  ------------------
  420|  2.40M|                        auto *arr = static_cast<HeapArray *>(curr);
  421|  2.40M|                        for (auto el : arr->elements)
  ------------------
  |  Branch (421:38): [True: 24.0M, False: 2.40M]
  ------------------
  422|  24.0M|                            addIfHeapEntity(el, s.children);
  423|  2.40M|                        break;
  424|  2.40M|                    }
  425|  1.88M|                    case HeapEntity::CLOSURE: {
  ------------------
  |  Branch (425:21): [True: 1.88M, False: 76.9M]
  ------------------
  426|  1.88M|                        assert(dynamic_cast<HeapClosure *>(curr));
  ------------------
  |  Branch (426:25): [True: 1.88M, False: 0]
  ------------------
  427|  1.88M|                        auto *func = static_cast<HeapClosure *>(curr);
  428|  1.88M|                        for (auto upv : func->upValues)
  ------------------
  |  Branch (428:39): [True: 4.43M, False: 1.88M]
  ------------------
  429|  4.43M|                            addIfHeapEntity(upv.second, s.children);
  430|  1.88M|                        if (func->self)
  ------------------
  |  Branch (430:29): [True: 1.65M, False: 227k]
  ------------------
  431|  1.65M|                            addIfHeapEntity(func->self, s.children);
  432|  1.88M|                        break;
  433|  1.88M|                    }
  434|  57.2M|                    case HeapEntity::THUNK: {
  ------------------
  |  Branch (434:21): [True: 57.2M, False: 21.5M]
  ------------------
  435|  57.2M|                        assert(dynamic_cast<HeapThunk *>(curr));
  ------------------
  |  Branch (435:25): [True: 57.2M, False: 0]
  ------------------
  436|  57.2M|                        auto *thunk = static_cast<HeapThunk *>(curr);
  437|  57.2M|                        if (thunk->filled) {
  ------------------
  |  Branch (437:29): [True: 10.9M, False: 46.2M]
  ------------------
  438|  10.9M|                            if (thunk->content.isHeap())
  ------------------
  |  Branch (438:33): [True: 7.95M, False: 3.03M]
  ------------------
  439|  7.95M|                                addIfHeapEntity(thunk->content.v.h, s.children);
  440|  46.2M|                        } else {
  441|  46.2M|                            for (auto upv : thunk->upValues)
  ------------------
  |  Branch (441:43): [True: 7.38M, False: 46.2M]
  ------------------
  442|  7.38M|                                addIfHeapEntity(upv.second, s.children);
  443|  46.2M|                            if (thunk->self)
  ------------------
  |  Branch (443:33): [True: 43.6M, False: 2.56M]
  ------------------
  444|  43.6M|                                addIfHeapEntity(thunk->self, s.children);
  445|  46.2M|                        }
  446|  57.2M|                        break;
  447|  57.2M|                    }
  448|  1.58M|                    case HeapEntity::STRING:
  ------------------
  |  Branch (448:21): [True: 1.58M, False: 77.2M]
  ------------------
  449|  1.58M|                        assert(dynamic_cast<HeapString *>(curr));
  ------------------
  |  Branch (449:25): [True: 1.58M, False: 0]
  ------------------
  450|  1.58M|                        break;
  451|  1.58M|                    default:
  ------------------
  |  Branch (451:21): [True: 0, False: 78.8M]
  ------------------
  452|      0|                        assert(false);
  ------------------
  |  Branch (452:25): [Folded, False: 0]
  ------------------
  453|      0|                        break;
  454|  78.8M|                }
  455|  78.8M|            }
  456|       |
  457|   312M|            if (s.children.size() > 0) {
  ------------------
  |  Branch (457:17): [True: 110M, False: 201M]
  ------------------
  458|   110M|                HeapEntity *next = s.children[s.children.size() - 1];
  459|   110M|                s.children.pop_back();
  460|   110M|                stack.emplace_back(next);  // CAUTION: s invalidated here
  461|   201M|            } else {
  462|   201M|                stack.pop_back();  // CAUTION: s invalidated here
  463|   201M|            }
  464|   312M|        }
  465|  90.8M|    }
vm.cpp:_ZZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromEPNS1_10HeapEntityEEN5StateC2ES4_:
  375|   201M|            State(HeapEntity *ent) : ent(ent) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap15addIfHeapEntityEPNS1_10HeapEntityERNSt3__16vectorIS4_NS5_9allocatorIS4_EEEE:
  340|   110M|    {
  341|   110M|        vec.push_back(v);
  342|   110M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromENS1_5ValueE:
  362|  49.3M|    {
  363|  49.3M|        if (v.isHeap())
  ------------------
  |  Branch (363:13): [True: 12.6M, False: 36.7M]
  ------------------
  364|  12.6M|            markFrom(v.v.h);
  365|  49.3M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap5sweepEv:
  469|   106k|    {
  470|   106k|        lastMark++;
  471|       |        // Heap shrinks during this loop.  Do not cache entities.size().
  472|   175M|        for (unsigned long i = 0; i < entities.size(); ++i) {
  ------------------
  |  Branch (472:35): [True: 175M, False: 106k]
  ------------------
  473|   175M|            HeapEntity *x = entities[i];
  474|   175M|            if (x->mark != lastMark) {
  ------------------
  |  Branch (474:17): [True: 96.9M, False: 78.8M]
  ------------------
  475|  96.9M|                delete x;
  476|  96.9M|                if (i != entities.size() - 1) {
  ------------------
  |  Branch (476:21): [True: 96.8M, False: 89.9k]
  ------------------
  477|       |                    // Swap it with the back.
  478|  96.8M|                    entities[i] = entities[entities.size() - 1];
  479|  96.8M|                }
  480|  96.9M|                entities.pop_back();
  481|  96.9M|                --i;
  482|  96.9M|            }
  483|   175M|        }
  484|   106k|        lastNumEntities = numEntities = entities.size();
  485|   106k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapThunk4fillERKNS1_5ValueE:
  145|  23.5M|    {
  146|  23.5M|        content = v;
  147|  23.5M|        filled = true;
  148|  23.5M|        self = nullptr;
  149|  23.5M|        upValues.clear();
  150|  23.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapArrayEJRKNSt3__16vectorIPNS1_9HeapThunkENS5_9allocatorIS8_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_19HeapArrayC2ERKNSt3__16vectorIPNS1_9HeapThunkENS3_9allocatorIS6_EEEE:
  159|  1.54M|        : HeapEntity(ARRAY), elements(elements)
  160|  1.54M|    {
  161|  1.54M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_10HeapStringEJRKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEEEEPT_DpOT0_:
  501|  34.8M|    {
  502|  34.8M|        T *r = new T(std::forward<Args>(args)...);
  503|  34.8M|        entities.push_back(r);
  504|  34.8M|        r->mark = lastMark;
  505|  34.8M|        numEntities = entities.size();
  506|  34.8M|        return r;
  507|  34.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapStringC2ERKNSt3__112basic_stringIDiNS3_11char_traitsIDiEENS3_9allocatorIDiEEEE:
  299|  34.8M|    HeapString(const UString &value) : HeapEntity(STRING), value(value) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierEDniDnEEEPT_DpOT0_:
  501|   607k|    {
  502|   607k|        T *r = new T(std::forward<Args>(args)...);
  503|   607k|        entities.push_back(r);
  504|   607k|        r->mark = lastMark;
  505|   607k|        numEntities = entities.size();
  506|   607k|        return r;
  507|   607k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_114HeapLeafObjectC2ENS1_10HeapEntity4TypeE:
  166|  1.54M|    HeapLeafObject(Type type) : HeapObject(type) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapObjectC2ENS1_10HeapEntity4TypeE:
  109|  2.54M|    HeapObject(Type type) : HeapEntity(type) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111HeapClosure5ParamC2EPKNS0_10IdentifierEPKNS0_3ASTE:
  275|  16.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|  8.06M|    {
  502|  8.06M|        T *r = new T(std::forward<Args>(args)...);
  503|  8.06M|        entities.push_back(r);
  504|  8.06M|        r->mark = lastMark;
  505|  8.06M|        numEntities = entities.size();
  506|  8.06M|        return r;
  507|  8.06M|    }
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|  10.0M|        : HeapEntity(CLOSURE),
  284|  10.0M|          upValues(up_values),
  285|  10.0M|          self(self),
  286|  10.0M|          offset(offset),
  287|  10.0M|          params(params),
  288|  10.0M|          body(body),
  289|  10.0M|          builtinName(builtin_name)
  290|  10.0M|    {
  291|  10.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJDnDniPKNS0_3ASTEEEEPT_DpOT0_:
  501|  3.57k|    {
  502|  3.57k|        T *r = new T(std::forward<Args>(args)...);
  503|  3.57k|        entities.push_back(r);
  504|  3.57k|        r->mark = lastMark;
  505|  3.57k|        numEntities = entities.size();
  506|  3.57k|        return r;
  507|  3.57k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJPNS0_10IdentifierERPNS1_10HeapObjectEiRKPNS0_3ASTEEEEPT_DpOT0_:
  501|   576k|    {
  502|   576k|        T *r = new T(std::forward<Args>(args)...);
  503|   576k|        entities.push_back(r);
  504|   576k|        r->mark = lastMark;
  505|   576k|        numEntities = entities.size();
  506|   576k|        return r;
  507|   576k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14HeapD2Ev:
  355|  3.57k|    {
  356|       |        // Nothing is marked, everything will be collected.
  357|  3.57k|        sweep();
  358|  3.57k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  501|  27.0M|    {
  502|  27.0M|        T *r = new T(std::forward<Args>(args)...);
  503|  27.0M|        entities.push_back(r);
  504|  27.0M|        r->mark = lastMark;
  505|  27.0M|        numEntities = entities.size();
  506|  27.0M|        return r;
  507|  27.0M|    }
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.94M|    {
  502|  1.94M|        T *r = new T(std::forward<Args>(args)...);
  503|  1.94M|        entities.push_back(r);
  504|  1.94M|        r->mark = lastMark;
  505|  1.94M|        numEntities = entities.size();
  506|  1.94M|        return r;
  507|  1.94M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRKPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  501|  17.5M|    {
  502|  17.5M|        T *r = new T(std::forward<Args>(args)...);
  503|  17.5M|        entities.push_back(r);
  504|  17.5M|        r->mark = lastMark;
  505|  17.5M|        numEntities = entities.size();
  506|  17.5M|        return r;
  507|  17.5M|    }
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|    106|    {
  502|    106|        T *r = new T(std::forward<Args>(args)...);
  503|    106|        entities.push_back(r);
  504|    106|        r->mark = lastMark;
  505|    106|        numEntities = entities.size();
  506|    106|        return r;
  507|    106|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_18HeapExtendedObjectEJRPNS1_10HeapObjectES7_EEEPT_DpOT0_:
  501|   998k|    {
  502|   998k|        T *r = new T(std::forward<Args>(args)...);
  503|   998k|        entities.push_back(r);
  504|   998k|        r->mark = lastMark;
  505|   998k|        numEntities = entities.size();
  506|   998k|        return r;
  507|   998k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_118HeapExtendedObjectC2EPNS1_10HeapObjectES4_:
  210|   998k|        : HeapObject(EXTENDED_OBJECT), left(left), right(right)
  211|   998k|    {
  212|   998k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRPNS0_3ASTEEEEPT_DpOT0_:
  501|  2.07M|    {
  502|  2.07M|        T *r = new T(std::forward<Args>(args)...);
  503|  2.07M|        entities.push_back(r);
  504|  2.07M|        r->mark = lastMark;
  505|  2.07M|        numEntities = entities.size();
  506|  2.07M|        return r;
  507|  2.07M|    }

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

libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_11StaticErrorE:
  108|  4.00k|{
  109|  4.00k|    o << err.toString();
  110|  4.00k|    return o;
  111|  4.00k|}
_ZNK7jsonnet8internal11StaticError8toStringEv:
   97|  4.00k|    {
   98|  4.00k|        std::stringstream ss;
   99|  4.00k|        if (location.isSet()) {
  ------------------
  |  Branch (99:13): [True: 3.98k, False: 19]
  ------------------
  100|  3.98k|            ss << location << ":";
  101|  3.98k|        }
  102|  4.00k|        ss << " " << msg;
  103|  4.00k|        return ss.str();
  104|  4.00k|    }
_ZNK7jsonnet8internal13LocationRange5isSetEv:
   58|   377k|    {
   59|   377k|        return begin.isSet();
   60|   377k|    }
_ZNK7jsonnet8internal8Location5isSetEv:
   31|   377k|    {
   32|   377k|        return line != 0;
   33|   377k|    }
libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_13LocationRangeE:
   64|  25.7k|{
   65|  25.7k|    if (loc.file.length() > 0)
  ------------------
  |  Branch (65:9): [True: 10.1k, False: 15.5k]
  ------------------
   66|  10.1k|        o << loc.file;
   67|  25.7k|    if (loc.isSet()) {
  ------------------
  |  Branch (67:9): [True: 23.9k, False: 1.80k]
  ------------------
   68|  23.9k|        if (loc.file.length() > 0)
  ------------------
  |  Branch (68:13): [True: 8.52k, False: 15.3k]
  ------------------
   69|  8.52k|            o << ":";
   70|  23.9k|        if (loc.begin.line == loc.end.line) {
  ------------------
  |  Branch (70:13): [True: 20.9k, False: 2.95k]
  ------------------
   71|  20.9k|            if (loc.begin.column == loc.end.column - 1) {
  ------------------
  |  Branch (71:17): [True: 4.34k, False: 16.6k]
  ------------------
   72|  4.34k|                o << loc.begin;
   73|  16.6k|            } else {
   74|  16.6k|                o << loc.begin << "-" << loc.end.column;
   75|  16.6k|            }
   76|  20.9k|        } else {
   77|  2.95k|            o << "(" << loc.begin << ")-(" << loc.end << ")";
   78|  2.95k|        }
   79|  23.9k|    }
   80|  25.7k|    return o;
   81|  25.7k|}
libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_8LocationE:
   41|  26.8k|{
   42|  26.8k|    o << loc.line << ":" << loc.column;
   43|  26.8k|    return o;
   44|  26.8k|}
_ZN7jsonnet8internal8LocationC2Ev:
   28|  4.83M|    Location(void) : line(0), column(0) {}
_ZN7jsonnet8internal8LocationC2Emm:
   29|   222M|    Location(unsigned long line, unsigned long column) : line(line), column(column) {}
_ZNK7jsonnet8internal8Location9successorEv:
   35|    549|    {
   36|    549|        return Location(this->line, this->column + 1);
   37|    549|    }
_ZN7jsonnet8internal13LocationRangeC2Ev:
   50|  2.41M|    LocationRange(void) {}
_ZN7jsonnet8internal13LocationRangeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   52|  6.42k|    LocationRange(const std::string &msg) : file(msg) {}
_ZN7jsonnet8internal13LocationRangeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS0_8LocationESD_:
   54|   172M|        : file(file), begin(begin), end(end)
   55|   172M|    {
   56|   172M|    }
_ZN7jsonnet8internal11StaticErrorC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS0_8LocationESA_:
   88|    549|        : location(filename, location, location.successor()), msg(msg)
   89|    549|    {
   90|    549|    }
_ZN7jsonnet8internal11StaticErrorC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   92|  3.45k|        : location(location), msg(msg)
   93|  3.45k|    {
   94|  3.45k|    }

_ZN7jsonnet8internal22jsonnet_string_unparseERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEEb:
   25|   512k|{
   26|   512k|    UStringStream ss;
   27|   512k|    ss << (single ? U'\'' : U'\"');
  ------------------
  |  Branch (27:12): [True: 0, False: 512k]
  ------------------
   28|   512k|    ss << jsonnet_string_escape(str, single);
   29|   512k|    ss << (single ? U'\'' : U'\"');
  ------------------
  |  Branch (29:12): [True: 0, False: 512k]
  ------------------
   30|   512k|    return ss.str();
   31|   512k|}
_ZN7jsonnet8internal21jsonnet_string_escapeERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEEb:
   34|   512k|{
   35|   512k|    UStringStream ss;
   36|   808M|    for (std::size_t i = 0; i < str.length(); ++i) {
  ------------------
  |  Branch (36:29): [True: 807M, False: 512k]
  ------------------
   37|   807M|        char32_t c = str[i];
   38|   807M|        switch (c) {
   39|   491k|            case U'\"': ss << (single ? U"\"" : U"\\\""); break;
  ------------------
  |  Branch (39:13): [True: 491k, False: 807M]
  |  Branch (39:32): [True: 0, False: 491k]
  ------------------
   40|   677k|            case U'\'': ss << (single ? U"\\\'" : U"\'"); break;
  ------------------
  |  Branch (40:13): [True: 677k, False: 807M]
  |  Branch (40:32): [True: 0, False: 677k]
  ------------------
   41|   743M|            case U'\\': ss << U"\\\\"; break;
  ------------------
  |  Branch (41:13): [True: 743M, False: 64.7M]
  ------------------
   42|   697k|            case U'\b': ss << U"\\b"; break;
  ------------------
  |  Branch (42:13): [True: 697k, False: 807M]
  ------------------
   43|  82.1k|            case U'\f': ss << U"\\f"; break;
  ------------------
  |  Branch (43:13): [True: 82.1k, False: 807M]
  ------------------
   44|  9.53M|            case U'\n': ss << U"\\n"; break;
  ------------------
  |  Branch (44:13): [True: 9.53M, False: 798M]
  ------------------
   45|  80.7k|            case U'\r': ss << U"\\r"; break;
  ------------------
  |  Branch (45:13): [True: 80.7k, False: 807M]
  ------------------
   46|   648k|            case U'\t': ss << U"\\t"; break;
  ------------------
  |  Branch (46:13): [True: 648k, False: 807M]
  ------------------
   47|  25.6k|            case U'\0': ss << U"\\u0000"; break;
  ------------------
  |  Branch (47:13): [True: 25.6k, False: 807M]
  ------------------
   48|  52.4M|            default: {
  ------------------
  |  Branch (48:13): [True: 52.4M, False: 755M]
  ------------------
   49|  52.4M|                if (c < 0x20 || (c >= 0x7f && c <= 0x9f)) {
  ------------------
  |  Branch (49:21): [True: 3.86M, False: 48.6M]
  |  Branch (49:34): [True: 16.4M, False: 32.1M]
  |  Branch (49:47): [True: 984k, False: 15.4M]
  ------------------
   50|       |                    // Unprintable, use \u
   51|  4.84M|                    std::stringstream ss8;
   52|  4.84M|                    ss8 << "\\u" << std::hex << std::setfill('0') << std::setw(4)
   53|  4.84M|                        << (unsigned long)(c);
   54|  4.84M|                    ss << decode_utf8(ss8.str());
   55|  47.6M|                } else {
   56|       |                    // Printable, write verbatim
   57|  47.6M|                    ss << c;
   58|  47.6M|                }
   59|  52.4M|            }
   60|   807M|        }
   61|   807M|    }
   62|   512k|    return ss.str();
   63|   512k|}
_ZN7jsonnet8internal28jsonnet_string_parse_unicodeERKNS0_13LocationRangeEPKDi:
   66|  25.6k|{
   67|  25.6k|    unsigned long codepoint = 0;
   68|       |    // Expect 4 hex digits.
   69|   128k|    for (unsigned i = 0; i < 4; ++i) {
  ------------------
  |  Branch (69:26): [True: 102k, False: 25.6k]
  ------------------
   70|   102k|        auto x = (unsigned char)(c[i]);
   71|   102k|        unsigned digit;
   72|   102k|        if (x == '\0') {
  ------------------
  |  Branch (72:13): [True: 20, False: 102k]
  ------------------
   73|     20|            auto msg = "Truncated unicode escape sequence in string literal.";
   74|     20|            throw StaticError(loc, msg);
   75|   102k|        } else if (x >= '0' && x <= '9') {
  ------------------
  |  Branch (75:20): [True: 102k, False: 17]
  |  Branch (75:32): [True: 88.4k, False: 14.1k]
  ------------------
   76|  88.4k|            digit = x - '0';
   77|  88.4k|        } else if (x >= 'a' && x <= 'f') {
  ------------------
  |  Branch (77:20): [True: 1.82k, False: 12.2k]
  |  Branch (77:32): [True: 1.81k, False: 11]
  ------------------
   78|  1.81k|            digit = x - 'a' + 10;
   79|  12.3k|        } else if (x >= 'A' && x <= 'F') {
  ------------------
  |  Branch (79:20): [True: 12.2k, False: 22]
  |  Branch (79:32): [True: 12.2k, False: 15]
  ------------------
   80|  12.2k|            digit = x - 'A' + 10;
   81|  12.2k|        } else {
   82|     37|            std::stringstream ss;
   83|     37|            ss << "Malformed unicode escape character, "
   84|     37|               << "should be hex: '" << x << "'";
   85|     37|            throw StaticError(loc, ss.str());
   86|     37|        }
   87|   102k|        codepoint *= 16;
   88|   102k|        codepoint += digit;
   89|   102k|    }
   90|  25.6k|    return codepoint;
   91|  25.6k|}
_ZN7jsonnet8internal16is_bmp_codepointEm:
   94|  25.3k|{
   95|  25.3k|    return codepoint < 0xd800 || (codepoint >= 0xe000 && codepoint < 0x10000);
  ------------------
  |  Branch (95:12): [True: 24.5k, False: 824]
  |  Branch (95:35): [True: 524, False: 300]
  |  Branch (95:58): [True: 524, False: 0]
  ------------------
   96|  25.3k|}
_ZN7jsonnet8internal23decode_utf16_surrogatesERKNS0_13LocationRangeEmm:
   99|    275|{
  100|    275|    if (high >= 0xd800 && high < 0xdc00 && low >= 0xdc00 && low < 0xe000) {
  ------------------
  |  Branch (100:9): [True: 275, False: 0]
  |  Branch (100:27): [True: 270, False: 5]
  |  Branch (100:44): [True: 264, False: 6]
  |  Branch (100:61): [True: 262, False: 2]
  ------------------
  101|    262|        return 0x10000 + ((high & 0x03ff) << 10) + (low & 0x03ff);
  102|    262|    } else {
  103|     13|        std::stringstream ss;
  104|     13|        ss << "Invalid UTF-16 bytes";
  105|     13|        throw StaticError(loc, ss.str());
  106|     13|    }
  107|    275|}
_ZN7jsonnet8internal23jsonnet_string_unescapeERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS4_11char_traitsIDiEENS4_9allocatorIDiEEEE:
  110|  3.87M|{
  111|  3.87M|    UString r;
  112|  3.87M|    const char32_t *s_ptr = s.c_str();
  113|  75.3M|    for (const char32_t *c = s_ptr; *c != U'\0'; ++c) {
  ------------------
  |  Branch (113:37): [True: 71.4M, False: 3.87M]
  ------------------
  114|  71.4M|        switch (*c) {
  115|   457k|            case '\\':
  ------------------
  |  Branch (115:13): [True: 457k, False: 71.0M]
  ------------------
  116|   457k|                switch (*(++c)) {
  117|  16.9k|                    case '"':
  ------------------
  |  Branch (117:21): [True: 16.9k, False: 440k]
  ------------------
  118|  22.9k|                    case '\'': r += *c; break;
  ------------------
  |  Branch (118:21): [True: 5.95k, False: 451k]
  ------------------
  119|       |
  120|  93.4k|                    case '\\': r += *c; break;
  ------------------
  |  Branch (120:21): [True: 93.4k, False: 364k]
  ------------------
  121|       |
  122|    533|                    case '/': r += *c; break;
  ------------------
  |  Branch (122:21): [True: 533, False: 457k]
  ------------------
  123|       |
  124|  11.1k|                    case 'b': r += '\b'; break;
  ------------------
  |  Branch (124:21): [True: 11.1k, False: 446k]
  ------------------
  125|       |
  126|  35.1k|                    case 'f': r += '\f'; break;
  ------------------
  |  Branch (126:21): [True: 35.1k, False: 422k]
  ------------------
  127|       |
  128|   221k|                    case 'n': r += '\n'; break;
  ------------------
  |  Branch (128:21): [True: 221k, False: 236k]
  ------------------
  129|       |
  130|  16.4k|                    case 'r': r += '\r'; break;
  ------------------
  |  Branch (130:21): [True: 16.4k, False: 441k]
  ------------------
  131|       |
  132|  31.0k|                    case 't': r += '\t'; break;
  ------------------
  |  Branch (132:21): [True: 31.0k, False: 426k]
  ------------------
  133|       |
  134|  25.3k|                    case 'u': {
  ------------------
  |  Branch (134:21): [True: 25.3k, False: 432k]
  ------------------
  135|  25.3k|                        ++c;  // Consume the 'u'.
  136|  25.3k|                        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|  25.3k|                        c += 3;
  141|  25.3k|                        if (!is_bmp_codepoint(codepoint)) {
  ------------------
  |  Branch (141:29): [True: 300, False: 25.0k]
  ------------------
  142|    300|                           if (*(++c) != '\\') {
  ------------------
  |  Branch (142:32): [True: 16, False: 284]
  ------------------
  143|     16|                                std::stringstream ss;
  144|     16|                                ss << "Invalid non-BMP Unicode escape in string literal";
  145|     16|                                throw StaticError(loc, ss.str());
  146|     16|                           }
  147|    284|                           if (*(++c) != 'u') {
  ------------------
  |  Branch (147:32): [True: 6, False: 278]
  ------------------
  148|      6|                                std::stringstream ss;
  149|      6|                                ss << "Invalid non-BMP Unicode escape in string literal";
  150|      6|                                throw StaticError(loc, ss.str());
  151|      6|                           }
  152|    278|                           ++c;
  153|    278|                           unsigned long codepoint2 = jsonnet_string_parse_unicode(loc, c);
  154|    278|                           c += 3;
  155|    278|                           codepoint = decode_utf16_surrogates(loc, codepoint, codepoint2);
  156|    278|                       }
  157|  25.3k|                       r += codepoint;
  158|  25.3k|                    } break;
  159|       |
  160|      3|                    case '\0': {
  ------------------
  |  Branch (160:21): [True: 3, False: 457k]
  ------------------
  161|      3|                        auto msg = "Truncated escape sequence in string literal.";
  162|      3|                        throw StaticError(loc, msg);
  163|  25.3k|                    }
  164|       |
  165|    127|                    default: {
  ------------------
  |  Branch (165:21): [True: 127, False: 457k]
  ------------------
  166|    127|                        std::stringstream ss;
  167|    127|                        std::string utf8;
  168|    127|                        encode_utf8(*c, utf8);
  169|    127|                        ss << "Unknown escape sequence in string literal: '" << utf8 << "'";
  170|    127|                        throw StaticError(loc, ss.str());
  171|  25.3k|                    }
  172|   457k|                }
  173|   457k|                break;
  174|       |
  175|  71.0M|            default:
  ------------------
  |  Branch (175:13): [True: 71.0M, False: 457k]
  ------------------
  176|       |                // Just a regular letter.
  177|  71.0M|                r += *c;
  178|  71.4M|        }
  179|  71.4M|    }
  180|  3.87M|    return r;
  181|  3.87M|}

_ZN7jsonnet8internal13UStringStreamlsERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  155|  22.5M|    {
  156|  22.5M|        buf.append(s);
  157|  22.5M|        return *this;
  158|  22.5M|    }
_ZN7jsonnet8internal13UStringStreamlsEPKDi:
  160|   763M|    {
  161|   763M|        buf.append(s);
  162|   763M|        return *this;
  163|   763M|    }
_ZN7jsonnet8internal13UStringStreamlsEDi:
  165|  48.6M|    {
  166|  48.6M|        buf.push_back(c);
  167|  48.6M|        return *this;
  168|  48.6M|    }
_ZN7jsonnet8internal13UStringStream3strEv:
  179|  7.90M|    {
  180|  7.90M|        return buf;
  181|  7.90M|    }
parser.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  38.2M|{
  141|  38.2M|    UString r;
  142|   271M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 232M, False: 38.2M]
  ------------------
  143|   232M|        r.push_back(decode_utf8(s, i));
  144|  38.2M|    return r;
  145|  38.2M|}
parser.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|   232M|{
   76|   232M|    char c0 = str[i];
   77|   232M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 220M, False: 12.1M]
  ------------------
   78|   220M|        return c0;
   79|   220M|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 404k, False: 11.7M]
  ------------------
   80|   404k|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 3.74k, False: 400k]
  ------------------
   81|  3.74k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  3.74k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|  3.74k|        }
   83|   400k|        char c1 = str[++i];
   84|   400k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 355k, False: 45.5k]
  ------------------
   85|   355k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   355k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|   355k|        }
   87|  45.5k|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|  11.7M|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 550k, False: 11.1M]
  ------------------
   89|   550k|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 1.56k, False: 549k]
  ------------------
   90|  1.56k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  1.56k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|  1.56k|        }
   92|   549k|        char c1 = str[++i];
   93|   549k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 496k, False: 52.9k]
  ------------------
   94|   496k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   496k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|   496k|        }
   96|  52.9k|        char c2 = str[++i];
   97|  52.9k|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 19.6k, False: 33.2k]
  ------------------
   98|  19.6k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  19.6k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|  19.6k|        }
  100|  33.2k|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|  11.1M|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 146k, False: 11.0M]
  ------------------
  102|   146k|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 2.67k, False: 143k]
  ------------------
  103|  2.67k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  2.67k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|  2.67k|        }
  105|   143k|        char c1 = str[++i];
  106|   143k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 106k, False: 37.5k]
  ------------------
  107|   106k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   106k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|   106k|        }
  109|  37.5k|        char c2 = str[++i];
  110|  37.5k|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 4.61k, False: 32.9k]
  ------------------
  111|  4.61k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  4.61k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|  4.61k|        }
  113|  32.9k|        char c3 = str[++i];
  114|  32.9k|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 9.75k, False: 23.1k]
  ------------------
  115|  9.75k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  9.75k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|  9.75k|        }
  117|  23.1k|        return ((c0 & 0x7) << 18ul) | ((c1 & 0x3F) << 12ul) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
  118|  11.0M|    } else {
  119|  11.0M|        return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  11.0M|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  120|  11.0M|    }
  121|   232M|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|    613|{
  134|    613|    std::string r;
  135|    613|    encode_utf8(s, r);
  136|    613|    return r;
  137|    613|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|    613|{
  128|    613|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 12.1M, False: 613]
  ------------------
  129|  12.1M|        encode_utf8(cp, r);
  130|    613|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  12.1M|{
   34|  12.1M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  12.1M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 0, False: 12.1M]
  ------------------
   35|      0|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  12.1M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  12.1M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 12.1M, False: 0]
  ------------------
   41|  12.1M|        s.push_back((char)x);
   42|  12.1M|        return 1;
   43|  12.1M|    } 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|  12.1M|}
string_utils.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  4.84M|{
  141|  4.84M|    UString r;
  142|  33.9M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 29.0M, False: 4.84M]
  ------------------
  143|  29.0M|        r.push_back(decode_utf8(s, i));
  144|  4.84M|    return r;
  145|  4.84M|}
string_utils.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  29.0M|{
   76|  29.0M|    char c0 = str[i];
   77|  29.0M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 29.0M, False: 0]
  ------------------
   78|  29.0M|        return c0;
   79|  29.0M|    } 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|  29.0M|}
string_utils.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|    127|{
   34|    127|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|    127|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 1, False: 126]
  ------------------
   35|      1|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      1|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|    127|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|    127|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 64, False: 63]
  ------------------
   41|     64|        s.push_back((char)x);
   42|     64|        return 1;
   43|     64|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 10, False: 53]
  ------------------
   44|     10|        bytes |= 0xC080;
   45|     10|        s.push_back((bytes >> 8) & 0xFF);
   46|     10|        s.push_back((bytes >> 0) & 0xFF);
   47|     10|        return 2;
   48|     53|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 37, False: 16]
  ------------------
   49|     37|        bytes |= 0xE08080;
   50|     37|        s.push_back((bytes >> 16) & 0xFF);
   51|     37|        s.push_back((bytes >> 8) & 0xFF);
   52|     37|        s.push_back((bytes >> 0) & 0xFF);
   53|     37|        return 3;
   54|     37|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 16, False: 0]
  ------------------
   55|     16|        bytes |= 0xF0808080;
   56|     16|        s.push_back((bytes >> 24) & 0xFF);
   57|     16|        s.push_back((bytes >> 16) & 0xFF);
   58|     16|        s.push_back((bytes >> 8) & 0xFF);
   59|     16|        s.push_back((bytes >> 0) & 0xFF);
   60|     16|        return 4;
   61|     16|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|    127|}
vm.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  5.18M|{
  141|  5.18M|    UString r;
  142|  15.5M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 10.3M, False: 5.18M]
  ------------------
  143|  10.3M|        r.push_back(decode_utf8(s, i));
  144|  5.18M|    return r;
  145|  5.18M|}
vm.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  10.3M|{
   76|  10.3M|    char c0 = str[i];
   77|  10.3M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 10.3M, False: 0]
  ------------------
   78|  10.3M|        return c0;
   79|  10.3M|    } 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.3M|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|   694k|{
  134|   694k|    std::string r;
  135|   694k|    encode_utf8(s, r);
  136|   694k|    return r;
  137|   694k|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|   694k|{
  128|   694k|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 611M, False: 694k]
  ------------------
  129|   611M|        encode_utf8(cp, r);
  130|   694k|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|   611M|{
   34|   611M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|   611M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 859, False: 611M]
  ------------------
   35|    859|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|    859|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|   611M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|   611M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 609M, False: 1.34M]
  ------------------
   41|   609M|        s.push_back((char)x);
   42|   609M|        return 1;
   43|   609M|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 5.55k, False: 1.33M]
  ------------------
   44|  5.55k|        bytes |= 0xC080;
   45|  5.55k|        s.push_back((bytes >> 8) & 0xFF);
   46|  5.55k|        s.push_back((bytes >> 0) & 0xFF);
   47|  5.55k|        return 2;
   48|  1.33M|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 1.32M, False: 8.17k]
  ------------------
   49|  1.32M|        bytes |= 0xE08080;
   50|  1.32M|        s.push_back((bytes >> 16) & 0xFF);
   51|  1.32M|        s.push_back((bytes >> 8) & 0xFF);
   52|  1.32M|        s.push_back((bytes >> 0) & 0xFF);
   53|  1.32M|        return 3;
   54|  1.32M|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 8.17k, False: 0]
  ------------------
   55|  8.17k|        bytes |= 0xF0808080;
   56|  8.17k|        s.push_back((bytes >> 24) & 0xFF);
   57|  8.17k|        s.push_back((bytes >> 16) & 0xFF);
   58|  8.17k|        s.push_back((bytes >> 8) & 0xFF);
   59|  8.17k|        s.push_back((bytes >> 0) & 0xFF);
   60|  8.17k|        return 4;
   61|  8.17k|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|   611M|}
_ZN7jsonnet8internal13UStringStreamlsIiEERS1_T_:
  171|   882k|    {
  172|   882k|        std::stringstream ss;
  173|   882k|        ss << c;
  174|   882k|        for (char c : ss.str())
  ------------------
  |  Branch (174:21): [True: 1.31M, False: 882k]
  ------------------
  175|  1.31M|            buf.push_back(char32_t(c));
  176|   882k|        return *this;
  177|   882k|    }
_ZN7jsonnet8internal13UStringStreamlsIjEERS1_T_:
  171|   220k|    {
  172|   220k|        std::stringstream ss;
  173|   220k|        ss << c;
  174|   220k|        for (char c : ss.str())
  ------------------
  |  Branch (174:21): [True: 696k, False: 220k]
  ------------------
  175|   696k|            buf.push_back(char32_t(c));
  176|   220k|        return *this;
  177|   220k|    }
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|   328k|{
  134|   328k|    std::string r;
  135|   328k|    encode_utf8(s, r);
  136|   328k|    return r;
  137|   328k|}
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|   328k|{
  128|   328k|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 2.19M, False: 328k]
  ------------------
  129|  2.19M|        encode_utf8(cp, r);
  130|   328k|}
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  2.19M|{
   34|  2.19M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  2.19M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 0, False: 2.19M]
  ------------------
   35|      0|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  2.19M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  2.19M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 2.19M, False: 0]
  ------------------
   41|  2.19M|        s.push_back((char)x);
   42|  2.19M|        return 1;
   43|  2.19M|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 0, False: 0]
  ------------------
   44|      0|        bytes |= 0xC080;
   45|      0|        s.push_back((bytes >> 8) & 0xFF);
   46|      0|        s.push_back((bytes >> 0) & 0xFF);
   47|      0|        return 2;
   48|      0|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 0, False: 0]
  ------------------
   49|      0|        bytes |= 0xE08080;
   50|      0|        s.push_back((bytes >> 16) & 0xFF);
   51|      0|        s.push_back((bytes >> 8) & 0xFF);
   52|      0|        s.push_back((bytes >> 0) & 0xFF);
   53|      0|        return 3;
   54|      0|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 0, False: 0]
  ------------------
   55|      0|        bytes |= 0xF0808080;
   56|      0|        s.push_back((bytes >> 24) & 0xFF);
   57|      0|        s.push_back((bytes >> 16) & 0xFF);
   58|      0|        s.push_back((bytes >> 8) & 0xFF);
   59|      0|        s.push_back((bytes >> 0) & 0xFF);
   60|      0|        return 4;
   61|      0|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|  2.19M|}
desugarer.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  7.81k|{
  141|  7.81k|    UString r;
  142|  50.7k|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 42.9k, False: 7.81k]
  ------------------
  143|  42.9k|        r.push_back(decode_utf8(s, i));
  144|  7.81k|    return r;
  145|  7.81k|}
desugarer.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  42.9k|{
   76|  42.9k|    char c0 = str[i];
   77|  42.9k|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 42.9k, False: 0]
  ------------------
   78|  42.9k|        return c0;
   79|  42.9k|    } 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|  42.9k|}

_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|  3.57k|{
 3521|  3.57k|    Interpreter vm(alloc,
 3522|  3.57k|                   ext_vars,
 3523|  3.57k|                   max_stack,
 3524|  3.57k|                   gc_min_objects,
 3525|  3.57k|                   gc_growth_trigger,
 3526|  3.57k|                   natives,
 3527|  3.57k|                   import_callback,
 3528|  3.57k|                   ctx);
 3529|  3.57k|    vm.evaluate(ast, 0);
 3530|  3.57k|    return vm.manifestMulti(string_output);
 3531|  3.57k|}
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|  3.57k|        : heap(gc_min_objects, gc_growth_trigger),
  946|  3.57k|          stack(max_stack),
  947|  3.57k|          alloc(alloc),
  948|  3.57k|          idImport(alloc->makeIdentifier(U"import")),
  949|  3.57k|          idArrayElement(alloc->makeIdentifier(U"array_element")),
  950|  3.57k|          idInvariant(alloc->makeIdentifier(U"object_assert")),
  951|  3.57k|          idInternal(alloc->makeIdentifier(U"__internal__")),
  952|  3.57k|          idJsonObjVar(alloc->makeIdentifier(U"_")),
  953|  3.57k|          idEmpty(alloc->makeIdentifier(U"")),
  954|  3.57k|          jsonObjVar(alloc->make<Var>(LocationRange(), Fodder{}, idJsonObjVar)),
  955|  3.57k|          externalVars(ext_vars),
  956|  3.57k|          importCallback(import_callback),
  957|  3.57k|          importCallbackContext(import_callback_context)
  958|  3.57k|    {
  959|  3.57k|        scratch = makeNull();
  960|       |        // Add a prefix to avoid conflicting with names from `native_callbacks`.
  961|  3.57k|        builtins["std:makeArray"] = &Interpreter::builtinMakeArray;
  962|  3.57k|        builtins["std:pow"] = &Interpreter::builtinPow;
  963|  3.57k|        builtins["std:floor"] = &Interpreter::builtinFloor;
  964|  3.57k|        builtins["std:ceil"] = &Interpreter::builtinCeil;
  965|  3.57k|        builtins["std:sqrt"] = &Interpreter::builtinSqrt;
  966|  3.57k|        builtins["std:sin"] = &Interpreter::builtinSin;
  967|  3.57k|        builtins["std:cos"] = &Interpreter::builtinCos;
  968|  3.57k|        builtins["std:tan"] = &Interpreter::builtinTan;
  969|  3.57k|        builtins["std:asin"] = &Interpreter::builtinAsin;
  970|  3.57k|        builtins["std:acos"] = &Interpreter::builtinAcos;
  971|  3.57k|        builtins["std:atan"] = &Interpreter::builtinAtan;
  972|  3.57k|        builtins["std:type"] = &Interpreter::builtinType;
  973|  3.57k|        builtins["std:filter"] = &Interpreter::builtinFilter;
  974|  3.57k|        builtins["std:objectHasEx"] = &Interpreter::builtinObjectHasEx;
  975|  3.57k|        builtins["std:length"] = &Interpreter::builtinLength;
  976|  3.57k|        builtins["std:objectFieldsEx"] = &Interpreter::builtinObjectFieldsEx;
  977|  3.57k|        builtins["std:objectRemoveKey"] = &Interpreter::builtinObjectRemoveKey;
  978|  3.57k|        builtins["std:codepoint"] = &Interpreter::builtinCodepoint;
  979|  3.57k|        builtins["std:char"] = &Interpreter::builtinChar;
  980|  3.57k|        builtins["std:log"] = &Interpreter::builtinLog;
  981|  3.57k|        builtins["std:exp"] = &Interpreter::builtinExp;
  982|  3.57k|        builtins["std:mantissa"] = &Interpreter::builtinMantissa;
  983|  3.57k|        builtins["std:exponent"] = &Interpreter::builtinExponent;
  984|  3.57k|        builtins["std:modulo"] = &Interpreter::builtinModulo;
  985|  3.57k|        builtins["std:extVar"] = &Interpreter::builtinExtVar;
  986|  3.57k|        builtins["std:primitiveEquals"] = &Interpreter::builtinPrimitiveEquals;
  987|  3.57k|        builtins["std:native"] = &Interpreter::builtinNative;
  988|  3.57k|        builtins["std:md5"] = &Interpreter::builtinMd5;
  989|  3.57k|        builtins["std:trace"] = &Interpreter::builtinTrace;
  990|  3.57k|        builtins["std:splitLimit"] = &Interpreter::builtinSplitLimit;
  991|  3.57k|        builtins["std:substr"] = &Interpreter::builtinSubstr;
  992|  3.57k|        builtins["std:range"] = &Interpreter::builtinRange;
  993|  3.57k|        builtins["std:strReplace"] = &Interpreter::builtinStrReplace;
  994|  3.57k|        builtins["std:asciiLower"] = &Interpreter::builtinAsciiLower;
  995|  3.57k|        builtins["std:asciiUpper"] = &Interpreter::builtinAsciiUpper;
  996|  3.57k|        builtins["std:join"] = &Interpreter::builtinJoin;
  997|  3.57k|        builtins["std:parseJson"] = &Interpreter::builtinParseJson;
  998|  3.57k|        builtins["std:parseYaml"] = &Interpreter::builtinParseYaml;
  999|  3.57k|        builtins["std:encodeUTF8"] = &Interpreter::builtinEncodeUTF8;
 1000|  3.57k|        builtins["std:decodeUTF8"] = &Interpreter::builtinDecodeUTF8;
 1001|  3.57k|        builtins["std:atan2"] = &Interpreter::builtinAtan2;
 1002|  3.57k|        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|  3.57k|        for (const auto& [name, cb] : native_callbacks) {
  ------------------
  |  Branch (1007:37): [True: 0, False: 3.57k]
  ------------------
 1008|      0|            nativeCallbacks.emplace("native:" + name, cb);
 1009|      0|        }
 1010|       |
 1011|  3.57k|        DesugaredObject *stdlib = makeStdlibAST(alloc, "__internal__");
 1012|  3.57k|        jsonnet_static_analysis(stdlib);
 1013|  3.57k|        stdlibAST = stdlib; // stdlibAST is const, so we need to do analysis before this assignment
 1014|  3.57k|        auto stdThunk = makeHeap<HeapThunk>(nullptr, nullptr, 0, static_cast<const AST*>(stdlibAST));
 1015|  3.57k|        stack.newCall(stdThunk->body->location, stdThunk, stdThunk->self, stdThunk->offset, stdThunk->upValues);
 1016|  3.57k|        evaluate(stdThunk->body, 0);
 1017|  3.57k|        stdObject = dynamic_cast<HeapObject*>(scratch.v.h);
 1018|  3.57k|        prepareSourceValThunks();
 1019|  3.57k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15StackC2Ej:
  258|  3.57k|    Stack(unsigned limit) : calls(0), limit(limit) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeNullEv:
  634|  28.7k|    {
  635|  28.7k|        Value r;
  636|  28.7k|        r.t = Value::NULL_TYPE;
  637|  28.7k|        return r;
  638|  28.7k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack3topEv:
  291|   548M|    {
  292|   548M|        return stack.back();
  293|   548M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter19validateBuiltinArgsERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_6vectorINS1_5ValueENSA_ISG_EEEENSF_INSG_4TypeENSA_ISL_EEEE:
 1043|   192k|    {
 1044|   192k|        if (args.size() == params.size()) {
  ------------------
  |  Branch (1044:13): [True: 192k, False: 0]
  ------------------
 1045|   544k|            for (std::size_t i = 0; i < args.size(); ++i) {
  ------------------
  |  Branch (1045:37): [True: 352k, False: 192k]
  ------------------
 1046|   352k|                if (args[i].t != params[i])
  ------------------
  |  Branch (1046:21): [True: 0, False: 352k]
  ------------------
 1047|      0|                    goto bad;
 1048|   352k|            }
 1049|   192k|            return;
 1050|   192k|        }
 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|   192k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter9makeErrorERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  567|  2.39k|    {
  568|  2.39k|        return stack.makeError(loc, msg);
  569|  2.39k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack9makeErrorERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  368|  3.05k|    {
  369|  3.05k|        std::vector<TraceFrame> stack_trace;
  370|  3.05k|        stack_trace.push_back(TraceFrame(loc));
  371|  1.48M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (371:40): [True: 1.48M, False: 3.05k]
  ------------------
  372|  1.48M|            const auto &f = stack[i];
  373|  1.48M|            if (f.isCall()) {
  ------------------
  |  Branch (373:17): [True: 348k, False: 1.13M]
  ------------------
  374|   348k|                if (f.context != nullptr) {
  ------------------
  |  Branch (374:21): [True: 348k, False: 0]
  ------------------
  375|       |                    // Give the last line a name.
  376|   348k|                    stack_trace[stack_trace.size() - 1].name = getName(i, f.context);
  377|   348k|                }
  378|   348k|                if (f.location.isSet() || f.location.file.length() > 0)
  ------------------
  |  Branch (378:21): [True: 282k, False: 65.9k]
  |  Branch (378:43): [True: 787, False: 65.2k]
  ------------------
  379|   282k|                    stack_trace.push_back(TraceFrame(f.location));
  380|   348k|            }
  381|  1.48M|        }
  382|  3.05k|        return RuntimeError(stack_trace, msg);
  383|  3.05k|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Frame6isCallEv:
  241|   623M|    {
  242|   623M|        return kind == FRAME_CALL;
  243|   623M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack7getNameEjPKNS1_10HeapEntityE:
  313|   348k|    {
  314|   348k|        std::string name;
  315|  1.47M|        for (int i = from_here - 1; i >= 0; --i) {
  ------------------
  |  Branch (315:37): [True: 1.47M, False: 2.16k]
  ------------------
  316|  1.47M|            const auto &f = stack[i];
  317|  1.47M|            for (const auto &pair : f.bindings) {
  ------------------
  |  Branch (317:35): [True: 592k, False: 1.47M]
  ------------------
  318|   592k|                HeapThunk *thunk = pair.second;
  319|   592k|                if (!thunk->filled)
  ------------------
  |  Branch (319:21): [True: 159k, False: 433k]
  ------------------
  320|   159k|                    continue;
  321|   433k|                if (!thunk->content.isHeap())
  ------------------
  |  Branch (321:21): [True: 56.8k, False: 376k]
  ------------------
  322|  56.8k|                    continue;
  323|   376k|                if (e != thunk->content.v.h)
  ------------------
  |  Branch (323:21): [True: 333k, False: 43.6k]
  ------------------
  324|   333k|                    continue;
  325|  43.6k|                name = encode_utf8(pair.first->name);
  326|  43.6k|            }
  327|       |            // Do not go into the next call frame, keep local reasoning.
  328|  1.47M|            if (f.isCall())
  ------------------
  |  Branch (328:17): [True: 345k, False: 1.12M]
  ------------------
  329|   345k|                break;
  330|  1.47M|        }
  331|       |
  332|   348k|        if (name == "")
  ------------------
  |  Branch (332:13): [True: 304k, False: 43.6k]
  ------------------
  333|   304k|            name = "anonymous";
  334|   348k|        if (dynamic_cast<const HeapObject *>(e)) {
  ------------------
  |  Branch (334:13): [True: 221k, False: 126k]
  ------------------
  335|   221k|            return "object <" + name + ">";
  336|   221k|        } else if (auto *thunk = dynamic_cast<const HeapThunk *>(e)) {
  ------------------
  |  Branch (336:26): [True: 71.6k, False: 55.1k]
  ------------------
  337|  71.6k|            if (thunk->name == nullptr) {
  ------------------
  |  Branch (337:17): [True: 7.33k, False: 64.3k]
  ------------------
  338|  7.33k|                return "";  // Argument of builtin, or root (since top level functions).
  339|  64.3k|            } else {
  340|  64.3k|                return "thunk <" + encode_utf8(thunk->name->name) + ">";
  341|  64.3k|            }
  342|  71.6k|        } else {
  343|  55.1k|            const auto *func = static_cast<const HeapClosure *>(e);
  344|  55.1k|            if (func->isBuiltin()) {
  ------------------
  |  Branch (344:17): [True: 0, False: 55.1k]
  ------------------
  345|      0|                return "builtin function <" + func->builtinName + ">";
  346|      0|            }
  347|  55.1k|            return "function <" + name + ">";
  348|  55.1k|        }
  349|   348k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack4markERNS1_4HeapE:
  284|   102k|    {
  285|  24.6M|        for (const auto &f : stack) {
  ------------------
  |  Branch (285:28): [True: 24.6M, False: 102k]
  ------------------
  286|  24.6M|            f.mark(heap);
  287|  24.6M|        }
  288|   102k|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Frame4markERNS1_4HeapE:
  225|  24.6M|    {
  226|  24.6M|        heap.markFrom(val);
  227|  24.6M|        heap.markFrom(val2);
  228|  24.6M|        if (context)
  ------------------
  |  Branch (228:13): [True: 16.6M, False: 7.98M]
  ------------------
  229|  16.6M|            heap.markFrom(context);
  230|  24.6M|        if (self)
  ------------------
  |  Branch (230:13): [True: 16.6M, False: 8.01M]
  ------------------
  231|  16.6M|            heap.markFrom(self);
  232|  24.6M|        for (const auto &bind : bindings)
  ------------------
  |  Branch (232:31): [True: 23.9M, False: 24.6M]
  ------------------
  233|  23.9M|            heap.markFrom(bind.second);
  234|  24.6M|        for (const auto &el : elements)
  ------------------
  |  Branch (234:29): [True: 0, False: 24.6M]
  ------------------
  235|      0|            heap.markFrom(el.second);
  236|  24.6M|        for (const auto &th : thunks)
  ------------------
  |  Branch (236:29): [True: 4.26M, False: 24.6M]
  ------------------
  237|  4.26M|            heap.markFrom(th);
  238|  24.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeNumberEd:
  615|  7.20M|    {
  616|  7.20M|        Value r;
  617|  7.20M|        r.t = Value::NUMBER;
  618|  7.20M|        r.v.d = v;
  619|  7.20M|        return r;
  620|  7.20M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter9makeArrayERKNSt3__16vectorIPNS1_9HeapThunkENS3_9allocatorIS6_EEEE:
  641|  1.54M|    {
  642|  1.54M|        Value r;
  643|  1.54M|        r.t = Value::ARRAY;
  644|  1.54M|        r.v.h = makeHeap<HeapArray>(v);
  645|  1.54M|        return r;
  646|  1.54M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapArrayEJRKNSt3__16vectorIPNS1_9HeapThunkENS5_9allocatorIS8_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.51k, False: 1.54M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  2.51k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  2.51k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  2.51k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  2.51k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 2.51k]
  ------------------
  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|   404k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 404k, False: 2.51k]
  ------------------
  597|   404k|                heap.markFrom(sourceVal.second);
  598|   404k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  2.51k|            heap.sweep();
  602|  2.51k|        }
  603|  1.54M|        return r;
  604|  1.54M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10builtinPowERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1103|  2.80k|    {
 1104|  2.80k|        validateBuiltinArgs(loc, "pow", args, {Value::NUMBER, Value::NUMBER});
 1105|  2.80k|        scratch = makeNumberCheck(loc, std::pow(args[0].v.d, args[1].v.d));
 1106|  2.80k|        return nullptr;
 1107|  2.80k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter15makeNumberCheckERKNS0_13LocationRangeEd:
  623|  6.43M|    {
  624|  6.43M|        if (std::isnan(v)) {
  ------------------
  |  Branch (624:13): [True: 0, False: 6.43M]
  ------------------
  625|      0|            throw makeError(loc, "not a number");
  626|      0|        }
  627|  6.43M|        if (std::isinf(v)) {
  ------------------
  |  Branch (627:13): [True: 26, False: 6.43M]
  ------------------
  628|     26|            throw makeError(loc, "overflow");
  629|     26|        }
  630|  6.43M|        return makeNumber(v);
  631|  6.43M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12builtinFloorERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1110|  27.2k|    {
 1111|  27.2k|        validateBuiltinArgs(loc, "floor", args, {Value::NUMBER});
 1112|  27.2k|        scratch = makeNumberCheck(loc, std::floor(args[0].v.d));
 1113|  27.2k|        return nullptr;
 1114|  27.2k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11builtinTypeERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1187|  2.72M|    {
 1188|  2.72M|        switch (args[0].t) {
  ------------------
  |  Branch (1188:17): [True: 2.72M, False: 0]
  ------------------
 1189|  29.4k|            case Value::NULL_TYPE: scratch = makeString(U"null"); return nullptr;
  ------------------
  |  Branch (1189:13): [True: 29.4k, False: 2.69M]
  ------------------
 1190|       |
 1191|   142k|            case Value::BOOLEAN: scratch = makeString(U"boolean"); return nullptr;
  ------------------
  |  Branch (1191:13): [True: 142k, False: 2.58M]
  ------------------
 1192|       |
 1193|   369k|            case Value::NUMBER: scratch = makeString(U"number"); return nullptr;
  ------------------
  |  Branch (1193:13): [True: 369k, False: 2.35M]
  ------------------
 1194|       |
 1195|   185k|            case Value::ARRAY: scratch = makeString(U"array"); return nullptr;
  ------------------
  |  Branch (1195:13): [True: 185k, False: 2.54M]
  ------------------
 1196|       |
 1197|     33|            case Value::FUNCTION: scratch = makeString(U"function"); return nullptr;
  ------------------
  |  Branch (1197:13): [True: 33, False: 2.72M]
  ------------------
 1198|       |
 1199|   125k|            case Value::OBJECT: scratch = makeString(U"object"); return nullptr;
  ------------------
  |  Branch (1199:13): [True: 125k, False: 2.60M]
  ------------------
 1200|       |
 1201|  1.87M|            case Value::STRING: scratch = makeString(U"string"); return nullptr;
  ------------------
  |  Branch (1201:13): [True: 1.87M, False: 853k]
  ------------------
 1202|  2.72M|        }
 1203|      0|        return nullptr;  // Quiet, compiler.
 1204|  2.72M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeStringERKNSt3__112basic_stringIDiNS3_11char_traitsIDiEENS3_9allocatorIDiEEEE:
  679|  34.8M|    {
  680|  34.8M|        Value r;
  681|  34.8M|        r.t = Value::STRING;
  682|  34.8M|        r.v.h = makeHeap<HeapString>(v);
  683|  34.8M|        return r;
  684|  34.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_10HeapStringEJRKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEEEEPT_DpOT0_:
  577|  34.8M|    {
  578|  34.8M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  34.8M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 38.6k, False: 34.8M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  38.6k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  38.6k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  38.6k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  38.6k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 38.6k]
  ------------------
  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|  6.22M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 6.22M, False: 38.6k]
  ------------------
  597|  6.22M|                heap.markFrom(sourceVal.second);
  598|  6.22M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  38.6k|            heap.sweep();
  602|  38.6k|        }
  603|  34.8M|        return r;
  604|  34.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12objectFieldsEPKNS1_10HeapObjectEb:
  773|   660k|    {
  774|   660k|        std::set<const Identifier *> r;
  775|  1.33M|        for (const auto &pair : objectFieldsAux(obj_)) {
  ------------------
  |  Branch (775:31): [True: 1.33M, False: 660k]
  ------------------
  776|  1.33M|            if (!manifesting || pair.second != ObjectField::HIDDEN)
  ------------------
  |  Branch (776:17): [True: 0, False: 1.33M]
  |  Branch (776:33): [True: 1.33M, False: 3.79k]
  ------------------
  777|  1.33M|                r.insert(pair.first);
  778|  1.33M|        }
  779|   660k|        return r;
  780|   660k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter15objectFieldsAuxEPKNS1_10HeapObjectE:
  740|  30.8M|    {
  741|  30.8M|        IdHideMap r;
  742|  30.8M|        if (auto *obj = dynamic_cast<const HeapSimpleObject *>(obj_)) {
  ------------------
  |  Branch (742:19): [True: 15.7M, False: 15.0M]
  ------------------
  743|  15.7M|            for (const auto &f : obj->fields) {
  ------------------
  |  Branch (743:32): [True: 9.46M, False: 15.7M]
  ------------------
  744|  9.46M|                r[f.first] = f.second.hide;
  745|  9.46M|            }
  746|       |
  747|  15.7M|        } else if (auto *obj = dynamic_cast<const HeapRestrictedObject *>(obj_)) {
  ------------------
  |  Branch (747:26): [True: 0, False: 15.0M]
  ------------------
  748|      0|            return obj->retainedKeys;
  749|       |
  750|  15.0M|        } else if (auto *obj = dynamic_cast<const HeapExtendedObject *>(obj_)) {
  ------------------
  |  Branch (750:26): [True: 15.0M, False: 0]
  ------------------
  751|  15.0M|            r = objectFieldsAux(obj->right);
  752|  30.5M|            for (const auto &pair : objectFieldsAux(obj->left)) {
  ------------------
  |  Branch (752:35): [True: 30.5M, False: 15.0M]
  ------------------
  753|  30.5M|                auto it = r.find(pair.first);
  754|  30.5M|                if (it == r.end()) {
  ------------------
  |  Branch (754:21): [True: 22.4M, False: 8.12M]
  ------------------
  755|       |                    // First time it is seen
  756|  22.4M|                    r[pair.first] = pair.second;
  757|  22.4M|                } else if (it->second == ObjectField::INHERIT) {
  ------------------
  |  Branch (757:28): [True: 7.81M, False: 315k]
  ------------------
  758|       |                    // Seen before, but with inherited visibility so use new visibility
  759|  7.81M|                    r[pair.first] = pair.second;
  760|  7.81M|                }
  761|  30.5M|            }
  762|       |
  763|  15.0M|        } 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.8M|        return r;
  768|  30.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeBooleanEb:
  607|  9.53M|    {
  608|  9.53M|        Value r;
  609|  9.53M|        r.t = Value::BOOLEAN;
  610|  9.53M|        r.v.b = v;
  611|  9.53M|        return r;
  612|  9.53M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinLengthERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1252|   595k|    {
 1253|   595k|        if (args.size() != 1) {
  ------------------
  |  Branch (1253:13): [True: 0, False: 595k]
  ------------------
 1254|      0|            throw makeError(loc, "length takes 1 parameter.");
 1255|      0|        }
 1256|   595k|        HeapEntity *e = args[0].v.h;
 1257|   595k|        switch (args[0].t) {
 1258|      1|            case Value::OBJECT: {
  ------------------
  |  Branch (1258:13): [True: 1, False: 595k]
  ------------------
 1259|      1|                auto fields = objectFields(static_cast<HeapObject *>(e), true);
 1260|      1|                scratch = makeNumber(fields.size());
 1261|      1|            } break;
 1262|       |
 1263|   317k|            case Value::ARRAY:
  ------------------
  |  Branch (1263:13): [True: 317k, False: 277k]
  ------------------
 1264|   317k|                scratch = makeNumber(static_cast<HeapArray *>(e)->elements.size());
 1265|   317k|                break;
 1266|       |
 1267|   277k|            case Value::STRING:
  ------------------
  |  Branch (1267:13): [True: 277k, False: 317k]
  ------------------
 1268|   277k|                scratch = makeNumber(static_cast<HeapString *>(e)->value.length());
 1269|   277k|                break;
 1270|       |
 1271|      0|            case Value::FUNCTION:
  ------------------
  |  Branch (1271:13): [True: 0, False: 595k]
  ------------------
 1272|      0|                scratch = makeNumber(static_cast<HeapClosure *>(e)->params.size());
 1273|      0|                break;
 1274|       |
 1275|      9|            default:
  ------------------
  |  Branch (1275:13): [True: 9, False: 595k]
  ------------------
 1276|      9|                throw makeError(loc,
 1277|      9|                                "length operates on strings, objects, "
 1278|      9|                                "and arrays, got " +
 1279|      9|                                    type_str(args[0]));
 1280|   595k|        }
 1281|   595k|        return nullptr;
 1282|   595k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter21builtinObjectFieldsExERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1285|   114k|    {
 1286|   114k|        validateBuiltinArgs(loc, "objectFieldsEx", args, {Value::OBJECT, Value::BOOLEAN});
 1287|   114k|        const auto *obj = static_cast<HeapObject *>(args[0].v.h);
 1288|   114k|        bool include_hidden = args[1].v.b;
 1289|       |        // Stash in a set first to sort them.
 1290|   114k|        std::set<UString> fields;
 1291|   607k|        for (const auto &field : objectFields(obj, !include_hidden)) {
  ------------------
  |  Branch (1291:32): [True: 607k, False: 114k]
  ------------------
 1292|   607k|            fields.insert(field->name);
 1293|   607k|        }
 1294|   114k|        scratch = makeArray({});
 1295|   114k|        auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 1296|   607k|        for (const auto &field : fields) {
  ------------------
  |  Branch (1296:32): [True: 607k, False: 114k]
  ------------------
 1297|   607k|            auto *th = makeHeap<HeapThunk>(idArrayElement, nullptr, 0, nullptr);
 1298|   607k|            elements.push_back(th);
 1299|   607k|            th->fill(makeString(field));
 1300|   607k|        }
 1301|   114k|        return nullptr;
 1302|   114k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierEDniDnEEEPT_DpOT0_:
  577|   607k|    {
  578|   607k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   607k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 1.31k, False: 606k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  1.31k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  1.31k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  1.31k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  1.31k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 1.31k]
  ------------------
  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|   212k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 212k, False: 1.31k]
  ------------------
  597|   212k|                heap.markFrom(sourceVal.second);
  598|   212k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  1.31k|            heap.sweep();
  602|  1.31k|        }
  603|   607k|        return r;
  604|   607k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11builtinCharERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1335|  2.74k|    {
 1336|  2.74k|        validateBuiltinArgs(loc, "char", args, {Value::NUMBER});
 1337|  2.74k|        long l = long(args[0].v.d);
 1338|  2.74k|        if (l < 0) {
  ------------------
  |  Branch (1338:13): [True: 61, False: 2.68k]
  ------------------
 1339|     61|            std::stringstream ss;
 1340|     61|            ss << "codepoints must be >= 0, got " << l;
 1341|     61|            throw makeError(loc, ss.str());
 1342|     61|        }
 1343|  2.68k|        if (l >= JSONNET_CODEPOINT_MAX) {
  ------------------
  |  |   22|  2.68k|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (1343:13): [True: 42, False: 2.64k]
  ------------------
 1344|     42|            std::stringstream ss;
 1345|     42|            ss << "invalid unicode codepoint, got " << l;
 1346|     42|            throw makeError(loc, ss.str());
 1347|     42|        }
 1348|  2.64k|        char32_t c = l;
 1349|  2.64k|        scratch = makeString(UString(&c, 1));
 1350|  2.64k|        return nullptr;
 1351|  2.68k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10builtinLogERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1354|  3.30k|    {
 1355|  3.30k|        validateBuiltinArgs(loc, "log", args, {Value::NUMBER});
 1356|  3.30k|        scratch = makeNumberCheck(loc, std::log(args[0].v.d));
 1357|  3.30k|        return nullptr;
 1358|  3.30k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinModuloERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1386|  40.3k|    {
 1387|  40.3k|        validateBuiltinArgs(loc, "modulo", args, {Value::NUMBER, Value::NUMBER});
 1388|  40.3k|        double a = args[0].v.d;
 1389|  40.3k|        double b = args[1].v.d;
 1390|  40.3k|        if (b == 0)
  ------------------
  |  Branch (1390:13): [True: 15, False: 40.3k]
  ------------------
 1391|     15|            throw makeError(loc, "division by zero.");
 1392|  40.3k|        scratch = makeNumberCheck(loc, std::fmod(a, b));
 1393|  40.3k|        return nullptr;
 1394|  40.3k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack3popEv:
  301|   104M|    {
  302|   104M|        if (top().isCall())
  ------------------
  |  Branch (302:13): [True: 42.3M, False: 62.1M]
  ------------------
  303|  42.3M|            calls--;
  304|   104M|        stack.pop_back();
  305|   104M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter22builtinPrimitiveEqualsERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1422|  4.54M|    {
 1423|  4.54M|        if (args.size() != 2) {
  ------------------
  |  Branch (1423:13): [True: 0, False: 4.54M]
  ------------------
 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|  4.54M|        if (args[0].t != args[1].t) {
  ------------------
  |  Branch (1428:13): [True: 0, False: 4.54M]
  ------------------
 1429|      0|            scratch = makeBoolean(false);
 1430|      0|            return nullptr;
 1431|      0|        }
 1432|  4.54M|        bool r;
 1433|  4.54M|        switch (args[0].t) {
 1434|  47.6k|            case Value::BOOLEAN: r = args[0].v.b == args[1].v.b; break;
  ------------------
  |  Branch (1434:13): [True: 47.6k, False: 4.49M]
  ------------------
 1435|       |
 1436|   146k|            case Value::NUMBER: r = args[0].v.d == args[1].v.d; break;
  ------------------
  |  Branch (1436:13): [True: 146k, False: 4.39M]
  ------------------
 1437|       |
 1438|  4.34M|            case Value::STRING:
  ------------------
  |  Branch (1438:13): [True: 4.34M, False: 203k]
  ------------------
 1439|  4.34M|                r = static_cast<HeapString *>(args[0].v.h)->value ==
 1440|  4.34M|                    static_cast<HeapString *>(args[1].v.h)->value;
 1441|  4.34M|                break;
 1442|       |
 1443|  9.73k|            case Value::NULL_TYPE: r = true; break;
  ------------------
  |  Branch (1443:13): [True: 9.73k, False: 4.53M]
  ------------------
 1444|       |
 1445|      1|            case Value::FUNCTION: throw makeError(loc, "cannot test equality of functions"); break;
  ------------------
  |  Branch (1445:13): [True: 1, False: 4.54M]
  ------------------
 1446|       |
 1447|      0|            default:
  ------------------
  |  Branch (1447:13): [True: 0, False: 4.54M]
  ------------------
 1448|      0|                throw makeError(loc,
 1449|      0|                                "primitiveEquals operates on primitive "
 1450|      0|                                "types, got " +
 1451|      0|                                    type_str(args[0]));
 1452|  4.54M|        }
 1453|  4.54M|        scratch = makeBoolean(r);
 1454|  4.54M|        return nullptr;
 1455|  4.54M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter18makeBuiltinFromASTEPKNS0_19BuiltinFunctionBodyE:
  658|  8.06M|    {
  659|  8.06M|        HeapClosure::Params hc_params;
  660|  12.7M|        for (const auto p : body->params) {
  ------------------
  |  Branch (660:27): [True: 12.7M, False: 8.06M]
  ------------------
  661|  12.7M|            hc_params.emplace_back(p, nullptr);
  662|  12.7M|        }
  663|  8.06M|        Value r;
  664|  8.06M|        r.t = Value::FUNCTION;
  665|  8.06M|        r.v.h = makeHeap<HeapClosure>(BindingFrame(), nullptr, 0, hc_params, body, body->name);
  666|  8.06M|        return r;
  667|  8.06M|    }
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|  8.06M|    {
  578|  8.06M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  8.06M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 8.84k, False: 8.05M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  8.84k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  8.84k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  8.84k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  8.84k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 8.84k]
  ------------------
  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|  1.42M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 1.42M, False: 8.84k]
  ------------------
  597|  1.42M|                heap.markFrom(sourceVal.second);
  598|  1.42M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  8.84k|            heap.sweep();
  602|  8.84k|        }
  603|  8.06M|        return r;
  604|  8.06M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinSubstrERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1599|  1.14k|    {
 1600|  1.14k|        validateBuiltinArgs(loc, "substr", args, {Value::STRING, Value::NUMBER, Value::NUMBER});
 1601|  1.14k|        const auto *str = static_cast<const HeapString *>(args[0].v.h);
 1602|  1.14k|        long from = long(args[1].v.d);
 1603|  1.14k|        long len = long(args[2].v.d);
 1604|  1.14k|        if (from < 0) {
  ------------------
  |  Branch (1604:13): [True: 0, False: 1.14k]
  ------------------
 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|  1.14k|        if (len < 0) {
  ------------------
  |  Branch (1609:13): [True: 0, False: 1.14k]
  ------------------
 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|  1.14k|        if (static_cast<unsigned long>(from) > str->value.size()) {
  ------------------
  |  Branch (1614:13): [True: 0, False: 1.14k]
  ------------------
 1615|      0|            scratch = makeString(UString());
 1616|      0|            return nullptr;
 1617|      0|        }
 1618|  1.14k|        if (size_t(len + from) > str->value.size()) {
  ------------------
  |  Branch (1618:13): [True: 0, False: 1.14k]
  ------------------
 1619|      0|          len = str->value.size() - from;
 1620|      0|        }
 1621|  1.14k|        scratch = makeString(str->value.substr(from, len));
 1622|  1.14k|        return nullptr;
 1623|  1.14k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJDnDniPKNS0_3ASTEEEEPT_DpOT0_:
  577|  3.57k|    {
  578|  3.57k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  3.57k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 3.57k]
  ------------------
  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|  3.57k|        return r;
  604|  3.57k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack7newCallERKNS0_13LocationRangeEPNS1_10HeapEntityEPNS1_10HeapObjectEjRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENSA_4lessISE_EENSA_9allocatorINSA_4pairIKSE_SG_EEEEEE:
  418|  42.9M|    {
  419|  42.9M|        tailCallTrimStack();
  420|  42.9M|        if (calls >= limit) {
  ------------------
  |  Branch (420:13): [True: 659, False: 42.9M]
  ------------------
  421|    659|            throw makeError(loc, "max stack frames exceeded.");
  422|    659|        }
  423|  42.9M|        stack.emplace_back(FRAME_CALL, loc);
  424|  42.9M|        calls++;
  425|  42.9M|        top().context = context;
  426|  42.9M|        top().self = self;
  427|  42.9M|        top().offset = offset;
  428|  42.9M|        top().bindings = up_values;
  429|  42.9M|        top().tailCall = false;
  430|       |
  431|  42.9M|#ifndef NDEBUG
  432|  42.9M|        for (const auto &bind : up_values) {
  ------------------
  |  Branch (432:31): [True: 41.6M, False: 42.9M]
  ------------------
  433|  41.6M|            if (bind.second == nullptr) {
  ------------------
  |  Branch (433:17): [True: 0, False: 41.6M]
  ------------------
  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|  41.6M|        }
  439|  42.9M|#endif
  440|  42.9M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack17tailCallTrimStackEv:
  394|  42.9M|    {
  395|  43.9M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (395:40): [True: 43.9M, False: 8.97k]
  ------------------
  396|  43.9M|            switch (stack[i].kind) {
  397|  14.5M|                case FRAME_CALL: {
  ------------------
  |  Branch (397:17): [True: 14.5M, False: 29.4M]
  ------------------
  398|  14.5M|                    if (!stack[i].tailCall || stack[i].thunks.size() > 0) {
  ------------------
  |  Branch (398:25): [True: 10.6M, False: 3.86M]
  |  Branch (398:47): [True: 3.52M, False: 339k]
  ------------------
  399|  14.1M|                        return;
  400|  14.1M|                    }
  401|       |                    // Remove all stack frames including this one.
  402|  1.34M|                    while (stack.size() > unsigned(i))
  ------------------
  |  Branch (402:28): [True: 1.00M, False: 339k]
  ------------------
  403|  1.00M|                        stack.pop_back();
  404|   339k|                    calls--;
  405|   339k|                    return;
  406|  14.5M|                } break;
  407|       |
  408|   980k|                case FRAME_LOCAL: break;
  ------------------
  |  Branch (408:17): [True: 980k, False: 42.9M]
  ------------------
  409|       |
  410|  28.4M|                default: return;
  ------------------
  |  Branch (410:17): [True: 28.4M, False: 15.4M]
  ------------------
  411|  43.9M|            }
  412|  43.9M|        }
  413|  42.9M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15FrameC2ERKNS1_9FrameKindERKNS0_13LocationRangeE:
  209|  53.6M|        : kind(kind),
  210|  53.6M|          ast(nullptr),
  211|  53.6M|          location(location),
  212|  53.6M|          tailCall(false),
  213|  53.6M|          elementId(0),
  214|  53.6M|          first(false),
  215|  53.6M|          context(NULL),
  216|  53.6M|          self(NULL),
  217|  53.6M|          offset(0)
  218|  53.6M|    {
  219|  53.6M|        val.t = Value::NULL_TYPE;
  220|  53.6M|        val2.t = Value::NULL_TYPE;
  221|  53.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter22prepareSourceValThunksEv:
  887|  3.57k|    void prepareSourceValThunks() {
  888|   576k|        for (const auto &field : stdlibAST->fields) {
  ------------------
  |  Branch (888:32): [True: 576k, False: 3.57k]
  ------------------
  889|   576k|            AST *nameAST = field.name;
  890|   576k|            if (nameAST->type != AST_LITERAL_STRING) {
  ------------------
  |  Branch (890:17): [True: 0, False: 576k]
  ------------------
  891|       |                // Skip any fields without a known name.
  892|      0|                continue;
  893|      0|            }
  894|   576k|            UString name = dynamic_cast<LiteralString *>(nameAST)->value;
  895|       |
  896|   576k|            sourceFuncIds.emplace_back(new Identifier(name));
  897|   576k|            auto *th = makeHeap<HeapThunk>(sourceFuncIds.back().get(), stdObject, 0, field.body);
  898|   576k|            sourceVals[encode_utf8(name)] = th;
  899|   576k|        }
  900|  3.57k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJPNS0_10IdentifierERPNS1_10HeapObjectEiRKPNS0_3ASTEEEEPT_DpOT0_:
  577|   576k|    {
  578|   576k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   576k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 576k]
  ------------------
  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|   576k|        return r;
  604|   576k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15StackD2Ev:
  260|  3.57k|    ~Stack(void) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8evaluateEPKNS0_3ASTEj:
 2096|  5.78M|    {
 2097|   121M|    recurse:
 2098|       |
 2099|   121M|        switch (ast_->type) {
 2100|  10.3M|            case AST_APPLY: {
  ------------------
  |  Branch (2100:13): [True: 10.3M, False: 111M]
  ------------------
 2101|  10.3M|                const auto &ast = *static_cast<const Apply *>(ast_);
 2102|  10.3M|                stack.newFrame(FRAME_APPLY_TARGET, ast_);
 2103|  10.3M|                ast_ = ast.target;
 2104|  10.3M|                goto recurse;
 2105|      0|            } break;
 2106|       |
 2107|   849k|            case AST_ARRAY: {
  ------------------
  |  Branch (2107:13): [True: 849k, False: 120M]
  ------------------
 2108|   849k|                const auto &ast = *static_cast<const Array *>(ast_);
 2109|   849k|                HeapObject *self;
 2110|   849k|                unsigned offset;
 2111|   849k|                stack.getSelfBinding(self, offset);
 2112|   849k|                scratch = makeArray({});
 2113|   849k|                auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 2114|  9.31M|                for (const auto &el : ast.elements) {
  ------------------
  |  Branch (2114:37): [True: 9.31M, False: 849k]
  ------------------
 2115|  9.31M|                    auto *el_th = makeHeap<HeapThunk>(idArrayElement, self, offset, el.expr);
 2116|  9.31M|                    el_th->upValues = capture(el.expr->freeVariables);
 2117|  9.31M|                    elements.push_back(el_th);
 2118|  9.31M|                }
 2119|   849k|            } break;
 2120|       |
 2121|  4.31M|            case AST_BINARY: {
  ------------------
  |  Branch (2121:13): [True: 4.31M, False: 117M]
  ------------------
 2122|  4.31M|                const auto &ast = *static_cast<const Binary *>(ast_);
 2123|  4.31M|                stack.newFrame(FRAME_BINARY_LEFT, ast_);
 2124|  4.31M|                ast_ = ast.left;
 2125|  4.31M|                goto recurse;
 2126|      0|            } break;
 2127|       |
 2128|  8.06M|            case AST_BUILTIN_FUNCTION: {
  ------------------
  |  Branch (2128:13): [True: 8.06M, False: 113M]
  ------------------
 2129|  8.06M|                const auto &ast = *static_cast<const BuiltinFunction *>(ast_);
 2130|  8.06M|                scratch = makeBuiltinFromAST(ast.body);
 2131|  8.06M|            } break;
 2132|       |
 2133|      0|            case AST_BUILTIN_FUNCTION_BODY: {
  ------------------
  |  Branch (2133:13): [True: 0, False: 121M]
  ------------------
 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|  7.22M|            case AST_CONDITIONAL: {
  ------------------
  |  Branch (2157:13): [True: 7.22M, False: 114M]
  ------------------
 2158|  7.22M|                const auto &ast = *static_cast<const Conditional *>(ast_);
 2159|  7.22M|                stack.newFrame(FRAME_IF, ast_);
 2160|  7.22M|                ast_ = ast.cond;
 2161|  7.22M|                goto recurse;
 2162|      0|            } break;
 2163|       |
 2164|  6.44k|            case AST_ERROR: {
  ------------------
  |  Branch (2164:13): [True: 6.44k, False: 121M]
  ------------------
 2165|  6.44k|                const auto &ast = *static_cast<const Error *>(ast_);
 2166|  6.44k|                stack.newFrame(FRAME_ERROR, ast_);
 2167|  6.44k|                ast_ = ast.expr;
 2168|  6.44k|                goto recurse;
 2169|      0|            } break;
 2170|       |
 2171|  1.94M|            case AST_FUNCTION: {
  ------------------
  |  Branch (2171:13): [True: 1.94M, False: 119M]
  ------------------
 2172|  1.94M|                const auto &ast = *static_cast<const Function *>(ast_);
 2173|  1.94M|                auto env = capture(ast.freeVariables);
 2174|  1.94M|                HeapObject *self;
 2175|  1.94M|                unsigned offset;
 2176|  1.94M|                stack.getSelfBinding(self, offset);
 2177|  1.94M|                HeapClosure::Params params;
 2178|  1.94M|                params.reserve(ast.params.size());
 2179|  3.72M|                for (const auto &p : ast.params) {
  ------------------
  |  Branch (2179:36): [True: 3.72M, False: 1.94M]
  ------------------
 2180|  3.72M|                    params.emplace_back(p.id, p.expr);
 2181|  3.72M|                }
 2182|  1.94M|                scratch = makeClosure(env, self, offset, params, ast.body);
 2183|  1.94M|            } break;
 2184|       |
 2185|     51|            case AST_IMPORT: {
  ------------------
  |  Branch (2185:13): [True: 51, False: 121M]
  ------------------
 2186|     51|                const auto &ast = *static_cast<const Import *>(ast_);
 2187|     51|                HeapThunk *thunk = import(ast.location, ast.file);
 2188|     51|                if (thunk->filled) {
  ------------------
  |  Branch (2188:21): [True: 0, False: 51]
  ------------------
 2189|      0|                    scratch = thunk->content;
 2190|     51|                } else {
 2191|     51|                    stack.newCall(ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2192|     51|                    ast_ = thunk->body;
 2193|     51|                    goto recurse;
 2194|     51|                }
 2195|     51|            } break;
 2196|       |
 2197|     15|            case AST_IMPORTSTR: {
  ------------------
  |  Branch (2197:13): [True: 15, False: 121M]
  ------------------
 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|      5|            case AST_IMPORTBIN: {
  ------------------
  |  Branch (2203:13): [True: 5, False: 121M]
  ------------------
 2204|      5|                const auto &ast = *static_cast<const Importbin *>(ast_);
 2205|      5|                const ImportCacheValue *value = importData(ast.location, ast.file);
 2206|      5|                scratch = makeArray({});
 2207|      5|                auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 2208|      5|                elements.reserve(value->content.size());
 2209|      5|                for (const auto c : value->content) {
  ------------------
  |  Branch (2209:35): [True: 0, False: 5]
  ------------------
 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|      5|            } break;
 2215|       |
 2216|  2.09M|            case AST_IN_SUPER: {
  ------------------
  |  Branch (2216:13): [True: 2.09M, False: 119M]
  ------------------
 2217|  2.09M|                const auto &ast = *static_cast<const InSuper *>(ast_);
 2218|  2.09M|                stack.newFrame(FRAME_IN_SUPER_ELEMENT, ast_);
 2219|  2.09M|                ast_ = ast.element;
 2220|  2.09M|                goto recurse;
 2221|     51|            } break;
 2222|       |
 2223|  10.5M|            case AST_INDEX: {
  ------------------
  |  Branch (2223:13): [True: 10.5M, False: 110M]
  ------------------
 2224|  10.5M|                const auto &ast = *static_cast<const Index *>(ast_);
 2225|  10.5M|                stack.newFrame(FRAME_INDEX_TARGET, ast_);
 2226|  10.5M|                ast_ = ast.target;
 2227|  10.5M|                goto recurse;
 2228|     51|            } break;
 2229|       |
 2230|  5.51M|            case AST_LOCAL: {
  ------------------
  |  Branch (2230:13): [True: 5.51M, False: 115M]
  ------------------
 2231|  5.51M|                const auto &ast = *static_cast<const Local *>(ast_);
 2232|  5.51M|                stack.newFrame(FRAME_LOCAL, ast_);
 2233|  5.51M|                Frame &f = stack.top();
 2234|       |                // First build all the thunks and bind them.
 2235|  5.51M|                HeapObject *self;
 2236|  5.51M|                unsigned offset;
 2237|  5.51M|                stack.getSelfBinding(self, offset);
 2238|  17.5M|                for (const auto &bind : ast.binds) {
  ------------------
  |  Branch (2238:39): [True: 17.5M, False: 5.51M]
  ------------------
 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|  17.5M|                    auto *th = makeHeap<HeapThunk>(bind.var, self, offset, bind.body);
 2242|  17.5M|                    f.bindings[bind.var] = th;
 2243|  17.5M|                }
 2244|       |                // Now capture the environment (including the new thunks, to make cycles).
 2245|  17.5M|                for (const auto &bind : ast.binds) {
  ------------------
  |  Branch (2245:39): [True: 17.5M, False: 5.51M]
  ------------------
 2246|  17.5M|                    auto *thunk = f.bindings[bind.var];
 2247|  17.5M|                    thunk->upValues = capture(bind.body->freeVariables);
 2248|  17.5M|                }
 2249|  5.51M|                ast_ = ast.body;
 2250|  5.51M|                goto recurse;
 2251|     51|            } break;
 2252|       |
 2253|   354k|            case AST_LITERAL_BOOLEAN: {
  ------------------
  |  Branch (2253:13): [True: 354k, False: 121M]
  ------------------
 2254|   354k|                const auto &ast = *static_cast<const LiteralBoolean *>(ast_);
 2255|   354k|                scratch = makeBoolean(ast.value);
 2256|   354k|            } break;
 2257|       |
 2258|  5.94M|            case AST_LITERAL_NUMBER: {
  ------------------
  |  Branch (2258:13): [True: 5.94M, False: 115M]
  ------------------
 2259|  5.94M|                const auto &ast = *static_cast<const LiteralNumber *>(ast_);
 2260|  5.94M|                scratch = makeNumberCheck(ast_->location, ast.value);
 2261|  5.94M|            } break;
 2262|       |
 2263|  30.1M|            case AST_LITERAL_STRING: {
  ------------------
  |  Branch (2263:13): [True: 30.1M, False: 91.2M]
  ------------------
 2264|  30.1M|                const auto &ast = *static_cast<const LiteralString *>(ast_);
 2265|  30.1M|                scratch = makeString(ast.value);
 2266|  30.1M|            } break;
 2267|       |
 2268|  25.1k|            case AST_LITERAL_NULL: {
  ------------------
  |  Branch (2268:13): [True: 25.1k, False: 121M]
  ------------------
 2269|  25.1k|                scratch = makeNull();
 2270|  25.1k|            } break;
 2271|       |
 2272|  1.54M|            case AST_DESUGARED_OBJECT: {
  ------------------
  |  Branch (2272:13): [True: 1.54M, False: 119M]
  ------------------
 2273|  1.54M|                const auto &ast = *static_cast<const DesugaredObject *>(ast_);
 2274|  1.54M|                if (ast.fields.empty()) {
  ------------------
  |  Branch (2274:21): [True: 829k, False: 714k]
  ------------------
 2275|   829k|                    auto env = capture(ast.freeVariables);
 2276|   829k|                    std::map<const Identifier *, HeapSimpleObject::Field> fields;
 2277|   829k|                    scratch = makeObject<HeapSimpleObject>(env, fields, ast.asserts);
 2278|   829k|                } else {
 2279|   714k|                    auto env = capture(ast.freeVariables);
 2280|   714k|                    stack.newFrame(FRAME_OBJECT, ast_);
 2281|   714k|                    auto fit = ast.fields.begin();
 2282|   714k|                    stack.top().fit = fit;
 2283|   714k|                    ast_ = fit->name;
 2284|   714k|                    goto recurse;
 2285|   714k|                }
 2286|  1.54M|            } break;
 2287|       |
 2288|   829k|            case AST_OBJECT_COMPREHENSION_SIMPLE: {
  ------------------
  |  Branch (2288:13): [True: 34, False: 121M]
  ------------------
 2289|     34|                const auto &ast = *static_cast<const ObjectComprehensionSimple *>(ast_);
 2290|     34|                stack.newFrame(FRAME_OBJECT_COMP_ARRAY, ast_);
 2291|     34|                ast_ = ast.array;
 2292|     34|                goto recurse;
 2293|  1.54M|            } break;
 2294|       |
 2295|  1.84M|            case AST_SELF: {
  ------------------
  |  Branch (2295:13): [True: 1.84M, False: 119M]
  ------------------
 2296|  1.84M|                scratch.t = Value::OBJECT;
 2297|  1.84M|                HeapObject *self;
 2298|  1.84M|                unsigned offset;
 2299|  1.84M|                stack.getSelfBinding(self, offset);
 2300|  1.84M|                scratch.v.h = self;
 2301|  1.84M|            } break;
 2302|       |
 2303|  1.86M|            case AST_SUPER_INDEX: {
  ------------------
  |  Branch (2303:13): [True: 1.86M, False: 119M]
  ------------------
 2304|  1.86M|                const auto &ast = *static_cast<const SuperIndex *>(ast_);
 2305|  1.86M|                stack.newFrame(FRAME_SUPER_INDEX, ast_);
 2306|  1.86M|                ast_ = ast.index;
 2307|  1.86M|                goto recurse;
 2308|  1.54M|            } break;
 2309|       |
 2310|  2.59M|            case AST_UNARY: {
  ------------------
  |  Branch (2310:13): [True: 2.59M, False: 118M]
  ------------------
 2311|  2.59M|                const auto &ast = *static_cast<const Unary *>(ast_);
 2312|  2.59M|                stack.newFrame(FRAME_UNARY, ast_);
 2313|  2.59M|                ast_ = ast.expr;
 2314|  2.59M|                goto recurse;
 2315|  1.54M|            } break;
 2316|       |
 2317|  26.1M|            case AST_VAR: {
  ------------------
  |  Branch (2317:13): [True: 26.1M, False: 95.2M]
  ------------------
 2318|  26.1M|                const auto &ast = *static_cast<const Var *>(ast_);
 2319|  26.1M|                auto *thunk = stack.lookUpVar(ast.id);
 2320|  26.1M|                if (thunk == nullptr) {
  ------------------
  |  Branch (2320:21): [True: 0, False: 26.1M]
  ------------------
 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|  26.1M|                if (thunk->filled) {
  ------------------
  |  Branch (2326:21): [True: 19.6M, False: 6.54M]
  ------------------
 2327|  19.6M|                    scratch = thunk->content;
 2328|  19.6M|                } else {
 2329|  6.54M|                    stack.newCall(ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2330|  6.54M|                    ast_ = thunk->body;
 2331|  6.54M|                    goto recurse;
 2332|  6.54M|                }
 2333|  26.1M|            } break;
 2334|       |
 2335|  19.6M|            default:
  ------------------
  |  Branch (2335:13): [True: 0, False: 121M]
  ------------------
 2336|      0|                std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_->type << std::endl;
 2337|      0|                std::abort();
 2338|   121M|        }
 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|   138M|        while (stack.size() > initial_stack_size) {
  ------------------
  |  Branch (2343:16): [True: 133M, False: 5.75M]
  ------------------
 2344|   133M|            Frame &f = stack.top();
 2345|   133M|            switch (f.kind) {
 2346|  10.3M|                case FRAME_APPLY_TARGET: {
  ------------------
  |  Branch (2346:17): [True: 10.3M, False: 122M]
  ------------------
 2347|  10.3M|                    const auto &ast = *static_cast<const Apply *>(f.ast);
 2348|  10.3M|                    if (scratch.t != Value::FUNCTION) {
  ------------------
  |  Branch (2348:25): [True: 16, False: 10.3M]
  ------------------
 2349|     16|                        throw makeError(ast.location,
 2350|     16|                                        "only functions can be called, got " + type_str(scratch));
 2351|     16|                    }
 2352|  10.3M|                    auto *func = static_cast<HeapClosure *>(scratch.v.h);
 2353|       |
 2354|  10.3M|                    std::set<const Identifier *> params_needed;
 2355|  17.6M|                    for (const auto &param : func->params) {
  ------------------
  |  Branch (2355:44): [True: 17.6M, False: 10.3M]
  ------------------
 2356|  17.6M|                        params_needed.insert(param.id);
 2357|  17.6M|                    }
 2358|       |
 2359|       |                    // Create thunks for arguments.
 2360|  10.3M|                    std::vector<HeapThunk *> positional_args;
 2361|  10.3M|                    BindingFrame args;
 2362|  10.3M|                    bool got_named = false;
 2363|  28.0M|                    for (std::size_t i = 0; i < ast.args.size(); ++i) {
  ------------------
  |  Branch (2363:45): [True: 17.6M, False: 10.3M]
  ------------------
 2364|  17.6M|                        const auto &arg = ast.args[i];
 2365|       |
 2366|  17.6M|                        const Identifier *name;
 2367|  17.6M|                        if (arg.id != nullptr) {
  ------------------
  |  Branch (2367:29): [True: 0, False: 17.6M]
  ------------------
 2368|      0|                            got_named = true;
 2369|      0|                            name = arg.id;
 2370|  17.6M|                        } else {
 2371|  17.6M|                            if (got_named) {
  ------------------
  |  Branch (2371:33): [True: 0, False: 17.6M]
  ------------------
 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|  17.6M|                            if (i >= func->params.size()) {
  ------------------
  |  Branch (2377:33): [True: 0, False: 17.6M]
  ------------------
 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|  17.6M|                            name = func->params[i].id;
 2384|  17.6M|                        }
 2385|       |                        // Special case for builtin functions -- leave identifier blank for
 2386|       |                        // them in the thunk.  This removes the thunk frame from the stacktrace.
 2387|  17.6M|                        const Identifier *name_ = func->isBuiltin() ? nullptr : name;
  ------------------
  |  Branch (2387:51): [True: 12.7M, False: 4.92M]
  ------------------
 2388|  17.6M|                        HeapObject *self;
 2389|  17.6M|                        unsigned offset;
 2390|  17.6M|                        stack.getSelfBinding(self, offset);
 2391|  17.6M|                        auto *thunk = makeHeap<HeapThunk>(name_, self, offset, arg.expr);
 2392|  17.6M|                        thunk->upValues = capture(arg.expr->freeVariables);
 2393|       |                        // While making the thunks, keep them in a frame to avoid premature garbage
 2394|       |                        // collection.
 2395|  17.6M|                        f.thunks.push_back(thunk);
 2396|  17.6M|                        if (args.find(name) != args.end()) {
  ------------------
  |  Branch (2396:29): [True: 0, False: 17.6M]
  ------------------
 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|  17.6M|                        args[name] = thunk;
 2402|  17.6M|                        if (params_needed.find(name) == params_needed.end()) {
  ------------------
  |  Branch (2402:29): [True: 0, False: 17.6M]
  ------------------
 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|  17.6M|                    }
 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|  10.3M|                    std::vector<HeapThunk *> def_arg_thunks;
 2416|  17.6M|                    for (const auto &param : func->params) {
  ------------------
  |  Branch (2416:44): [True: 17.6M, False: 10.3M]
  ------------------
 2417|  17.6M|                        if (args.find(param.id) != args.end())
  ------------------
  |  Branch (2417:29): [True: 17.6M, False: 115]
  ------------------
 2418|  17.6M|                            continue;
 2419|    115|                        if (param.def == nullptr) {
  ------------------
  |  Branch (2419:29): [True: 9, False: 106]
  ------------------
 2420|      9|                            std::stringstream ss;
 2421|      9|                            ss << "function parameter " << encode_utf8(param.id->name)
 2422|      9|                               << " not bound in call.";
 2423|      9|                            throw makeError(ast.location, ss.str());
 2424|      9|                        }
 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|    106|                        const Identifier *name_ = func->isBuiltin() ? nullptr : param.id;
  ------------------
  |  Branch (2428:51): [True: 0, False: 106]
  ------------------
 2429|    106|                        auto *thunk =
 2430|    106|                            makeHeap<HeapThunk>(name_, func->self, func->offset, param.def);
 2431|    106|                        f.thunks.push_back(thunk);
 2432|    106|                        def_arg_thunks.push_back(thunk);
 2433|    106|                        args[param.id] = thunk;
 2434|    106|                    }
 2435|       |
 2436|  10.3M|                    BindingFrame up_values = func->upValues;
 2437|  10.3M|                    up_values.insert(args.begin(), args.end());
 2438|       |
 2439|       |                    // Fill in upvalues
 2440|  10.3M|                    for (HeapThunk *thunk : def_arg_thunks) {
  ------------------
  |  Branch (2440:43): [True: 91, False: 10.3M]
  ------------------
 2441|     91|                        thunk->upValues = up_values;
 2442|     91|                    }
 2443|       |
 2444|       |                    // Cache these, because pop will invalidate them.
 2445|  10.3M|                    std::vector<HeapThunk *> thunks_copy = f.thunks;
 2446|       |
 2447|  10.3M|                    const AST *f_ast = f.ast;
 2448|  10.3M|                    stack.pop();
 2449|       |
 2450|  10.3M|                    if (func->isBuiltin()) {
  ------------------
  |  Branch (2450:25): [True: 8.06M, False: 2.28M]
  ------------------
 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|  8.06M|                        stack.newFrame(FRAME_BUILTIN_FORCE_THUNKS, f_ast);
 2455|  8.06M|                        assert(func->upValues.empty());
  ------------------
  |  Branch (2455:25): [True: 8.06M, False: 0]
  ------------------
 2456|  8.06M|                        stack.top().bindings = up_values;
 2457|  8.06M|                        stack.top().thunks = thunks_copy;
 2458|  8.06M|                        stack.top().val = scratch;
 2459|  8.06M|                        goto replaceframe;
 2460|  8.06M|                    } else {
 2461|       |                        // User defined function.
 2462|  2.28M|                        stack.newCall(ast.location, func, func->self, func->offset, up_values);
 2463|  2.28M|                        if (ast.tailstrict) {
  ------------------
  |  Branch (2463:29): [True: 1.51M, False: 769k]
  ------------------
 2464|  1.51M|                            stack.top().tailCall = true;
 2465|  1.51M|                            if (thunks_copy.size() == 0) {
  ------------------
  |  Branch (2465:33): [True: 0, False: 1.51M]
  ------------------
 2466|       |                                // No need to force thunks, proceed straight to body.
 2467|      0|                                ast_ = func->body;
 2468|      0|                                goto recurse;
 2469|  1.51M|                            } else {
 2470|       |                                // The check for args.size() > 0
 2471|  1.51M|                                stack.top().thunks = thunks_copy;
 2472|  1.51M|                                stack.top().val = scratch;
 2473|  1.51M|                                goto replaceframe;
 2474|  1.51M|                            }
 2475|  1.51M|                        } else {
 2476|   769k|                            ast_ = func->body;
 2477|   769k|                            goto recurse;
 2478|   769k|                        }
 2479|  2.28M|                    }
 2480|  10.3M|                } break;
 2481|       |
 2482|  4.08M|                case FRAME_BINARY_LEFT: {
  ------------------
  |  Branch (2482:17): [True: 4.08M, False: 129M]
  ------------------
 2483|  4.08M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 2484|  4.08M|                    const Value &lhs = scratch;
 2485|  4.08M|                    if (lhs.t == Value::BOOLEAN) {
  ------------------
  |  Branch (2485:25): [True: 168k, False: 3.91M]
  ------------------
 2486|       |                        // Handle short-cut semantics
 2487|   168k|                        switch (ast.op) {
 2488|  57.8k|                            case BOP_AND: {
  ------------------
  |  Branch (2488:29): [True: 57.8k, False: 110k]
  ------------------
 2489|  57.8k|                                if (!lhs.v.b) {
  ------------------
  |  Branch (2489:37): [True: 10.3k, False: 47.5k]
  ------------------
 2490|  10.3k|                                    scratch = makeBoolean(false);
 2491|  10.3k|                                    goto popframe;
 2492|  10.3k|                                }
 2493|  57.8k|                            } break;
 2494|       |
 2495|   107k|                            case BOP_OR: {
  ------------------
  |  Branch (2495:29): [True: 107k, False: 60.2k]
  ------------------
 2496|   107k|                                if (lhs.v.b) {
  ------------------
  |  Branch (2496:37): [True: 3.71k, False: 104k]
  ------------------
 2497|  3.71k|                                    scratch = makeBoolean(true);
 2498|  3.71k|                                    goto popframe;
 2499|  3.71k|                                }
 2500|   107k|                            } break;
 2501|       |
 2502|   104k|                            default:;
  ------------------
  |  Branch (2502:29): [True: 2.36k, False: 165k]
  ------------------
 2503|   168k|                        }
 2504|   168k|                    }
 2505|  4.06M|                    stack.top().kind = FRAME_BINARY_RIGHT;
 2506|  4.06M|                    stack.top().val = lhs;
 2507|  4.06M|                    ast_ = ast.right;
 2508|  4.06M|                    goto recurse;
 2509|  4.08M|                } break;
 2510|       |
 2511|  4.06M|                case FRAME_BINARY_RIGHT: {
  ------------------
  |  Branch (2511:17): [True: 4.06M, False: 129M]
  ------------------
 2512|  4.06M|                    stack.top().val2 = scratch;
 2513|  4.06M|                    stack.top().kind = FRAME_BINARY_OP;
 2514|  4.06M|                }
 2515|  4.06M|                [[fallthrough]];
 2516|  4.06M|                case FRAME_BINARY_OP: {
  ------------------
  |  Branch (2516:17): [True: 313, False: 133M]
  ------------------
 2517|  4.06M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 2518|  4.06M|                    const Value &lhs = stack.top().val;
 2519|  4.06M|                    const Value &rhs = stack.top().val2;
 2520|       |
 2521|       |                    // Handle cases where the LHS and RHS are not the same type.
 2522|  4.06M|                    if (lhs.t == Value::STRING || rhs.t == Value::STRING) {
  ------------------
  |  Branch (2522:25): [True: 1.18M, False: 2.87M]
  |  Branch (2522:51): [True: 23.3k, False: 2.85M]
  ------------------
 2523|  1.21M|                        if (ast.op == BOP_PLUS) {
  ------------------
  |  Branch (2523:29): [True: 1.14M, False: 68.7k]
  ------------------
 2524|       |                            // Handle co-ercions for string processing.
 2525|  1.14M|                            stack.top().kind = FRAME_STRING_CONCAT;
 2526|  1.14M|                            stack.top().val2 = rhs;
 2527|  1.14M|                            goto replaceframe;
 2528|  1.14M|                        }
 2529|  1.21M|                    }
 2530|  2.92M|                    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.92M]
  ------------------
 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.92M]
  ------------------
 2538|      0|                            std::cerr << "INTERNAL ERROR: Notequals not desugared" << std::endl;
 2539|      0|                            abort();
 2540|       |
 2541|       |                        // e in e
 2542|  8.17k|                        case BOP_IN: {
  ------------------
  |  Branch (2542:25): [True: 8.17k, False: 2.91M]
  ------------------
 2543|  8.17k|                            if (lhs.t != Value::STRING) {
  ------------------
  |  Branch (2543:33): [True: 1, False: 8.17k]
  ------------------
 2544|      1|                                throw makeError(ast.location,
 2545|      1|                                                "the left hand side of the 'in' operator should be "
 2546|      1|                                                "a string,  got " +
 2547|      1|                                                    type_str(lhs));
 2548|      1|                            }
 2549|  8.17k|                            auto *field = static_cast<HeapString *>(lhs.v.h);
 2550|  8.17k|                            switch (rhs.t) {
 2551|  8.17k|                                case Value::OBJECT: {
  ------------------
  |  Branch (2551:33): [True: 8.17k, False: 2]
  ------------------
 2552|  8.17k|                                    auto *obj = static_cast<HeapObject *>(rhs.v.h);
 2553|  8.17k|                                    auto *fid = alloc->makeIdentifier(field->value);
 2554|  8.17k|                                    unsigned unused_found_at = 0;
 2555|  8.17k|                                    bool in = findObject(fid, obj, 0, unused_found_at);
 2556|  8.17k|                                    scratch = makeBoolean(in);
 2557|  8.17k|                                } break;
 2558|       |
 2559|      2|                                default:
  ------------------
  |  Branch (2559:33): [True: 2, False: 8.17k]
  ------------------
 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|  8.17k|                            }
 2566|  8.17k|                            goto popframe;
 2567|  8.17k|                        }
 2568|       |
 2569|  2.91M|                        default:;
  ------------------
  |  Branch (2569:25): [True: 2.91M, False: 8.17k]
  ------------------
 2570|  2.92M|                    }
 2571|       |                    // Everything else requires matching types.
 2572|  2.91M|                    if (lhs.t != rhs.t) {
  ------------------
  |  Branch (2572:25): [True: 109, False: 2.91M]
  ------------------
 2573|    109|                        throw makeError(ast.location,
 2574|    109|                                        "binary operator " + bop_string(ast.op) +
 2575|    109|                                            " requires "
 2576|    109|                                            "matching types, got " +
 2577|    109|                                            type_str(lhs) + " and " + type_str(rhs) + ".");
 2578|    109|                    }
 2579|  2.91M|                    switch (lhs.t) {
  ------------------
  |  Branch (2579:29): [True: 2.91M, False: 0]
  ------------------
 2580|   612k|                        case Value::ARRAY:
  ------------------
  |  Branch (2580:25): [True: 612k, False: 2.30M]
  ------------------
 2581|   612k|                            if (ast.op == BOP_PLUS) {
  ------------------
  |  Branch (2581:33): [True: 579k, False: 32.6k]
  ------------------
 2582|   579k|                                auto *arr_l = static_cast<HeapArray *>(lhs.v.h);
 2583|   579k|                                auto *arr_r = static_cast<HeapArray *>(rhs.v.h);
 2584|   579k|                                std::vector<HeapThunk *> elements;
 2585|   579k|                                for (auto *el : arr_l->elements)
  ------------------
  |  Branch (2585:47): [True: 64.0M, False: 579k]
  ------------------
 2586|  64.0M|                                    elements.push_back(el);
 2587|   579k|                                for (auto *el : arr_r->elements)
  ------------------
  |  Branch (2587:47): [True: 2.02M, False: 579k]
  ------------------
 2588|  2.02M|                                    elements.push_back(el);
 2589|   579k|                                scratch = makeArray(elements);
 2590|   579k|                            } else if (ast.op == BOP_LESS || ast.op == BOP_LESS_EQ || ast.op == BOP_GREATER || ast.op == BOP_GREATER_EQ) {
  ------------------
  |  Branch (2590:40): [True: 8.39k, False: 24.3k]
  |  Branch (2590:62): [True: 10.9k, False: 13.3k]
  |  Branch (2590:87): [True: 3.80k, False: 9.52k]
  |  Branch (2590:112): [True: 9.52k, False: 5]
  ------------------
 2591|  32.6k|                                HeapThunk *func;
 2592|  32.6k|                                switch(ast.op) {
 2593|  8.39k|                                case BOP_LESS:
  ------------------
  |  Branch (2593:33): [True: 8.39k, False: 24.2k]
  ------------------
 2594|  8.39k|                                    func = sourceVals["__array_less"];
 2595|  8.39k|                                    break;
 2596|  10.9k|                                case BOP_LESS_EQ:
  ------------------
  |  Branch (2596:33): [True: 10.9k, False: 21.7k]
  ------------------
 2597|  10.9k|                                    func = sourceVals["__array_less_or_equal"];
 2598|  10.9k|                                    break;
 2599|  3.80k|                                case BOP_GREATER:
  ------------------
  |  Branch (2599:33): [True: 3.80k, False: 28.8k]
  ------------------
 2600|  3.80k|                                    func = sourceVals["__array_greater"];
 2601|  3.80k|                                    break;
 2602|  9.52k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2602:33): [True: 9.52k, False: 23.1k]
  ------------------
 2603|  9.52k|                                    func = sourceVals["__array_greater_or_equal"];
 2604|  9.52k|                                    break;
 2605|      0|                                default:
  ------------------
  |  Branch (2605:33): [True: 0, False: 32.6k]
  ------------------
 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|  32.6k|                                }
 2608|  32.6k|                                if (!func->filled) {
  ------------------
  |  Branch (2608:37): [True: 313, False: 32.3k]
  ------------------
 2609|    313|                                    stack.newCall(ast.location, func, func->self, func->offset, func->upValues);
 2610|    313|                                    ast_ = func->body;
 2611|    313|                                    goto recurse;
 2612|    313|                                }
 2613|  32.3k|                                auto *lhs_th = makeHeap<HeapThunk>(idInternal, f.self, f.offset, ast.left);
 2614|  32.3k|                                lhs_th->fill(lhs);
 2615|  32.3k|                                f.thunks.push_back(lhs_th);
 2616|  32.3k|                                auto *rhs_th = makeHeap<HeapThunk>(idInternal, f.self, f.offset, ast.right);
 2617|  32.3k|                                rhs_th->fill(rhs);
 2618|  32.3k|                                f.thunks.push_back(rhs_th);
 2619|  32.3k|                                const AST *orig_ast = ast_;
 2620|  32.3k|                                stack.pop();
 2621|  32.3k|                                ast_ = callSourceVal(orig_ast, func, {lhs_th, rhs_th});
 2622|  32.3k|                                goto recurse;
 2623|  32.6k|                            } else {
 2624|      5|                                throw makeError(ast.location,
 2625|      5|                                                "binary operator " + bop_string(ast.op) +
 2626|      5|                                                    " does not operate on arrays.");
 2627|      5|                            }
 2628|   579k|                            break;
 2629|       |
 2630|   579k|                        case Value::BOOLEAN:
  ------------------
  |  Branch (2630:25): [True: 151k, False: 2.76M]
  ------------------
 2631|   151k|                            switch (ast.op) {
 2632|  47.3k|                                case BOP_AND: scratch = makeBoolean(lhs.v.b && rhs.v.b); break;
  ------------------
  |  Branch (2632:33): [True: 47.3k, False: 104k]
  |  Branch (2632:69): [True: 47.3k, False: 0]
  |  Branch (2632:80): [True: 40.8k, False: 6.51k]
  ------------------
 2633|       |
 2634|   104k|                                case BOP_OR: scratch = makeBoolean(lhs.v.b || rhs.v.b); break;
  ------------------
  |  Branch (2634:33): [True: 104k, False: 47.4k]
  |  Branch (2634:68): [True: 0, False: 104k]
  |  Branch (2634:79): [True: 3.54k, False: 100k]
  ------------------
 2635|       |
 2636|     28|                                default:
  ------------------
  |  Branch (2636:33): [True: 28, False: 151k]
  ------------------
 2637|     28|                                    throw makeError(ast.location,
 2638|     28|                                                    "binary operator " + bop_string(ast.op) +
 2639|     28|                                                        " does not operate on booleans.");
 2640|   151k|                            }
 2641|   151k|                            break;
 2642|       |
 2643|  1.09M|                        case Value::NUMBER:
  ------------------
  |  Branch (2643:25): [True: 1.09M, False: 1.82M]
  ------------------
 2644|  1.09M|                            switch (ast.op) {
 2645|   312k|                                case BOP_PLUS:
  ------------------
  |  Branch (2645:33): [True: 312k, False: 777k]
  ------------------
 2646|   312k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d + rhs.v.d);
 2647|   312k|                                    break;
 2648|       |
 2649|  41.7k|                                case BOP_MINUS:
  ------------------
  |  Branch (2649:33): [True: 41.7k, False: 1.04M]
  ------------------
 2650|  41.7k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d - rhs.v.d);
 2651|  41.7k|                                    break;
 2652|       |
 2653|  6.21k|                                case BOP_MULT:
  ------------------
  |  Branch (2653:33): [True: 6.21k, False: 1.08M]
  ------------------
 2654|  6.21k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d * rhs.v.d);
 2655|  6.21k|                                    break;
 2656|       |
 2657|  59.8k|                                case BOP_DIV:
  ------------------
  |  Branch (2657:33): [True: 59.8k, False: 1.03M]
  ------------------
 2658|  59.8k|                                    if (rhs.v.d == 0)
  ------------------
  |  Branch (2658:41): [True: 3, False: 59.8k]
  ------------------
 2659|      3|                                        throw makeError(ast.location, "division by zero.");
 2660|  59.8k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d / rhs.v.d);
 2661|  59.8k|                                    break;
 2662|       |
 2663|       |                                    // No need to check doubles made from longs
 2664|       |
 2665|    501|                                case BOP_SHIFT_L: {
  ------------------
  |  Branch (2665:33): [True: 501, False: 1.09M]
  ------------------
 2666|    501|                                    if (rhs.v.d < 0)
  ------------------
  |  Branch (2666:41): [True: 1, False: 500]
  ------------------
 2667|      1|                                        throw makeError(ast.location, "shift by negative exponent.");
 2668|       |
 2669|    500|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2670|    500|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2671|    500|                                    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|    500|                                    if (long_r >= 1 && abs(long_l) >= (1LL << (63 - long_r))) {
  ------------------
  |  Branch (2675:41): [True: 319, False: 181]
  |  Branch (2675:56): [True: 49, False: 270]
  ------------------
 2676|     49|                                        throw makeError(ast.location,
 2677|     49|                                            "numeric value outside safe integer range for bitwise operation.");
 2678|     49|                                    }
 2679|       |
 2680|       |                                    // Left-shift of a negative number is undefined until C++20.
 2681|       |                                    // Perform the shift on unsigned int to avoid that.
 2682|    451|                                    scratch = makeNumber(static_cast<int64_t>(static_cast<uint64_t>(long_l) << long_r));
 2683|    451|                                } break;
 2684|       |
 2685|     22|                                case BOP_SHIFT_R: {
  ------------------
  |  Branch (2685:33): [True: 22, False: 1.09M]
  ------------------
 2686|     22|                                    if (rhs.v.d < 0)
  ------------------
  |  Branch (2686:41): [True: 1, False: 21]
  ------------------
 2687|      1|                                        throw makeError(ast.location, "shift by negative exponent.");
 2688|       |
 2689|     21|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2690|     21|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2691|     21|                                    long_r = long_r % 64;
 2692|     21|                                    scratch = makeNumber(long_l >> long_r);
 2693|     21|                                } break;
 2694|       |
 2695|  17.6k|                                case BOP_BITWISE_AND: {
  ------------------
  |  Branch (2695:33): [True: 17.6k, False: 1.07M]
  ------------------
 2696|  17.6k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2697|  17.6k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2698|  17.6k|                                    scratch = makeNumber(long_l & long_r);
 2699|  17.6k|                                } break;
 2700|       |
 2701|  15.0k|                                case BOP_BITWISE_XOR: {
  ------------------
  |  Branch (2701:33): [True: 15.0k, False: 1.07M]
  ------------------
 2702|  15.0k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2703|  15.0k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2704|  15.0k|                                    scratch = makeNumber(long_l ^ long_r);
 2705|  15.0k|                                } break;
 2706|       |
 2707|  5.96k|                                case BOP_BITWISE_OR: {
  ------------------
  |  Branch (2707:33): [True: 5.96k, False: 1.08M]
  ------------------
 2708|  5.96k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2709|  5.96k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2710|  5.96k|                                    scratch = makeNumber(long_l | long_r);
 2711|  5.96k|                                } break;
 2712|       |
 2713|  33.4k|                                case BOP_LESS_EQ: scratch = makeBoolean(lhs.v.d <= rhs.v.d); break;
  ------------------
  |  Branch (2713:33): [True: 33.4k, False: 1.05M]
  ------------------
 2714|       |
 2715|   408k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2715:33): [True: 408k, False: 681k]
  ------------------
 2716|   408k|                                    scratch = makeBoolean(lhs.v.d >= rhs.v.d);
 2717|   408k|                                    break;
 2718|       |
 2719|   168k|                                case BOP_LESS: scratch = makeBoolean(lhs.v.d < rhs.v.d); break;
  ------------------
  |  Branch (2719:33): [True: 168k, False: 922k]
  ------------------
 2720|       |
 2721|  20.0k|                                case BOP_GREATER: scratch = makeBoolean(lhs.v.d > rhs.v.d); break;
  ------------------
  |  Branch (2721:33): [True: 20.0k, False: 1.07M]
  ------------------
 2722|       |
 2723|      5|                                default:
  ------------------
  |  Branch (2723:33): [True: 5, False: 1.09M]
  ------------------
 2724|      5|                                    throw makeError(ast.location,
 2725|      5|                                                    "binary operator " + bop_string(ast.op) +
 2726|      5|                                                        " does not operate on numbers.");
 2727|  1.09M|                            }
 2728|  1.09M|                            break;
 2729|       |
 2730|  1.09M|                        case Value::FUNCTION:
  ------------------
  |  Branch (2730:25): [True: 2, False: 2.91M]
  ------------------
 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.91M]
  ------------------
 2736|      1|                            throw makeError(ast.location,
 2737|      1|                                            "binary operator " + bop_string(ast.op) +
 2738|      1|                                                " does not operate on null.");
 2739|       |
 2740|   998k|                        case Value::OBJECT: {
  ------------------
  |  Branch (2740:25): [True: 998k, False: 1.91M]
  ------------------
 2741|   998k|                            if (ast.op != BOP_PLUS) {
  ------------------
  |  Branch (2741:33): [True: 5, False: 998k]
  ------------------
 2742|      5|                                throw makeError(ast.location,
 2743|      5|                                                "binary operator " + bop_string(ast.op) +
 2744|      5|                                                    " does not operate on objects.");
 2745|      5|                            }
 2746|   998k|                            auto *lhs_obj = static_cast<HeapObject *>(lhs.v.h);
 2747|   998k|                            auto *rhs_obj = static_cast<HeapObject *>(rhs.v.h);
 2748|   998k|                            scratch = makeObject<HeapExtendedObject>(lhs_obj, rhs_obj);
 2749|   998k|                        } break;
 2750|       |
 2751|  60.5k|                        case Value::STRING: {
  ------------------
  |  Branch (2751:25): [True: 60.5k, False: 2.85M]
  ------------------
 2752|  60.5k|                            const UString &lhs_str = static_cast<HeapString *>(lhs.v.h)->value;
 2753|  60.5k|                            const UString &rhs_str = static_cast<HeapString *>(rhs.v.h)->value;
 2754|  60.5k|                            switch (ast.op) {
 2755|      0|                                case BOP_PLUS: scratch = makeString(lhs_str + rhs_str); break;
  ------------------
  |  Branch (2755:33): [True: 0, False: 60.5k]
  ------------------
 2756|       |
 2757|  8.88k|                                case BOP_LESS_EQ: scratch = makeBoolean(lhs_str <= rhs_str); break;
  ------------------
  |  Branch (2757:33): [True: 8.88k, False: 51.6k]
  ------------------
 2758|       |
 2759|  41.6k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2759:33): [True: 41.6k, False: 18.9k]
  ------------------
 2760|  41.6k|                                    scratch = makeBoolean(lhs_str >= rhs_str);
 2761|  41.6k|                                    break;
 2762|       |
 2763|  6.00k|                                case BOP_LESS: scratch = makeBoolean(lhs_str < rhs_str); break;
  ------------------
  |  Branch (2763:33): [True: 6.00k, False: 54.5k]
  ------------------
 2764|       |
 2765|  3.99k|                                case BOP_GREATER: scratch = makeBoolean(lhs_str > rhs_str); break;
  ------------------
  |  Branch (2765:33): [True: 3.99k, False: 56.5k]
  ------------------
 2766|       |
 2767|     30|                                default:
  ------------------
  |  Branch (2767:33): [True: 30, False: 60.5k]
  ------------------
 2768|     30|                                    throw makeError(ast.location,
 2769|     30|                                                    "binary operator " + bop_string(ast.op) +
 2770|     30|                                                        " does not operate on strings.");
 2771|  60.5k|                            }
 2772|  60.5k|                        } break;
 2773|  2.91M|                    }
 2774|  2.91M|                } break;
 2775|       |
 2776|  2.88M|                case FRAME_BUILTIN_FILTER: {
  ------------------
  |  Branch (2776:17): [True: 0, False: 133M]
  ------------------
 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|  20.8M|                case FRAME_BUILTIN_FORCE_THUNKS: {
  ------------------
  |  Branch (2801:17): [True: 20.8M, False: 112M]
  ------------------
 2802|  20.8M|                    const auto &location = f.location;
 2803|  20.8M|                    auto *func = static_cast<HeapClosure *>(f.val.v.h);
 2804|  20.8M|                    if (f.elementId == f.thunks.size()) {
  ------------------
  |  Branch (2804:25): [True: 8.06M, False: 12.7M]
  ------------------
 2805|       |                        // All thunks forced, now the builtin implementations.
 2806|  8.06M|                        const std::string &builtin_name = func->builtinName;
 2807|  8.06M|                        std::vector<Value> args;
 2808|  12.7M|                        for (const auto &p : func->params) {
  ------------------
  |  Branch (2808:44): [True: 12.7M, False: 8.06M]
  ------------------
 2809|  12.7M|                            const auto it = f.bindings.find(p.id);
 2810|  12.7M|                            if (it != f.bindings.end()) {
  ------------------
  |  Branch (2810:33): [True: 12.7M, False: 0]
  ------------------
 2811|  12.7M|                                assert(it->second->filled);
  ------------------
  |  Branch (2811:33): [True: 12.7M, False: 0]
  ------------------
 2812|  12.7M|                                args.push_back(it->second->content);
 2813|  12.7M|                            } 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|  12.7M|                        }
 2820|       |
 2821|  8.06M|                        BuiltinMap::const_iterator bit = builtins.find(builtin_name);
 2822|  8.06M|                        if (bit != builtins.end()) {
  ------------------
  |  Branch (2822:29): [True: 8.06M, False: 0]
  ------------------
 2823|  8.06M|                            const AST *new_ast = (this->*bit->second)(location, args);
 2824|  8.06M|                            if (new_ast != nullptr) {
  ------------------
  |  Branch (2824:33): [True: 0, False: 8.06M]
  ------------------
 2825|      0|                                ast_ = new_ast;
 2826|      0|                                goto recurse;
 2827|      0|                            }
 2828|  8.06M|                            break;
 2829|  8.06M|                        }
 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|  12.7M|                    } else {
 2889|       |                        // Not all arguments forced yet.
 2890|  12.7M|                        HeapThunk *th = f.thunks[f.elementId++];
 2891|  12.7M|                        if (!th->filled) {
  ------------------
  |  Branch (2891:29): [True: 12.7M, False: 0]
  ------------------
 2892|  12.7M|                            stack.newCall(location, th, th->self, th->offset, th->upValues);
 2893|  12.7M|                            ast_ = th->body;
 2894|  12.7M|                            goto recurse;
 2895|  12.7M|                        } else {
 2896|       |                            // Otherwise loop back around to force the next thunk.
 2897|      0|                            goto replaceframe;
 2898|      0|                        }
 2899|  12.7M|                    }
 2900|  20.8M|                } break;
 2901|       |
 2902|  41.7M|                case FRAME_CALL: {
  ------------------
  |  Branch (2902:17): [True: 41.7M, False: 91.4M]
  ------------------
 2903|  41.7M|                    if (auto *thunk = dynamic_cast<HeapThunk *>(f.context)) {
  ------------------
  |  Branch (2903:31): [True: 22.9M, False: 18.8M]
  ------------------
 2904|       |                        // If we called a thunk, cache result.
 2905|  22.9M|                        thunk->fill(scratch);
 2906|  22.9M|                    } else if (auto *closure = dynamic_cast<HeapClosure *>(f.context)) {
  ------------------
  |  Branch (2906:38): [True: 6.95M, False: 11.9M]
  ------------------
 2907|  6.95M|                        if (f.elementId < f.thunks.size()) {
  ------------------
  |  Branch (2907:29): [True: 3.52M, False: 3.42M]
  ------------------
 2908|       |                            // If tailstrict, force thunks
 2909|  3.52M|                            HeapThunk *th = f.thunks[f.elementId++];
 2910|  3.52M|                            if (!th->filled) {
  ------------------
  |  Branch (2910:33): [True: 3.52M, False: 0]
  ------------------
 2911|  3.52M|                                stack.newCall(f.location, th, th->self, th->offset, th->upValues);
 2912|  3.52M|                                ast_ = th->body;
 2913|  3.52M|                                goto recurse;
 2914|  3.52M|                            }
 2915|  3.52M|                        } else if (f.thunks.size() == 0) {
  ------------------
  |  Branch (2915:36): [True: 1.92M, False: 1.50M]
  ------------------
 2916|       |                            // Body has now been executed
 2917|  1.92M|                        } else {
 2918|       |                            // Execute the body
 2919|  1.50M|                            f.thunks.clear();
 2920|  1.50M|                            f.elementId = 0;
 2921|  1.50M|                            ast_ = closure->body;
 2922|  1.50M|                            goto recurse;
 2923|  1.50M|                        }
 2924|  6.95M|                    }
 2925|       |                    // Result of call is in scratch, just pop.
 2926|  41.7M|                } break;
 2927|       |
 2928|  36.7M|                case FRAME_ERROR: {
  ------------------
  |  Branch (2928:17): [True: 4.11k, False: 133M]
  ------------------
 2929|  4.11k|                    const auto &ast = *static_cast<const Error *>(f.ast);
 2930|  4.11k|                    UString msg;
 2931|  4.11k|                    if (scratch.t == Value::STRING) {
  ------------------
  |  Branch (2931:25): [True: 376, False: 3.73k]
  ------------------
 2932|    376|                        msg = static_cast<HeapString *>(scratch.v.h)->value;
 2933|  3.73k|                    } else {
 2934|  3.73k|                        msg = toString(ast.location);
 2935|  3.73k|                    }
 2936|  4.11k|                    throw makeError(ast.location, encode_utf8(msg));
 2937|  41.7M|                } break;
 2938|       |
 2939|  7.20M|                case FRAME_IF: {
  ------------------
  |  Branch (2939:17): [True: 7.20M, False: 126M]
  ------------------
 2940|  7.20M|                    const auto &ast = *static_cast<const Conditional *>(f.ast);
 2941|  7.20M|                    if (scratch.t != Value::BOOLEAN) {
  ------------------
  |  Branch (2941:25): [True: 79, False: 7.20M]
  ------------------
 2942|     79|                        throw makeError(
 2943|     79|                            ast.location,
 2944|     79|                            "condition must be boolean, got " + type_str(scratch) + ".");
 2945|     79|                    }
 2946|  7.20M|                    ast_ = scratch.v.b ? ast.branchTrue : ast.branchFalse;
  ------------------
  |  Branch (2946:28): [True: 2.48M, False: 4.71M]
  ------------------
 2947|  7.20M|                    stack.pop();
 2948|  7.20M|                    goto recurse;
 2949|  7.20M|                } break;
 2950|       |
 2951|  1.86M|                case FRAME_SUPER_INDEX: {
  ------------------
  |  Branch (2951:17): [True: 1.86M, False: 131M]
  ------------------
 2952|  1.86M|                    const auto &ast = *static_cast<const SuperIndex *>(f.ast);
 2953|  1.86M|                    HeapObject *self;
 2954|  1.86M|                    unsigned offset;
 2955|  1.86M|                    stack.getSelfBinding(self, offset);
 2956|  1.86M|                    offset++;
 2957|  1.86M|                    if (offset >= countLeaves(self)) {
  ------------------
  |  Branch (2957:25): [True: 1, False: 1.86M]
  ------------------
 2958|      1|                        throw makeError(ast.location,
 2959|      1|                                        "attempt to use super when there is no super class.");
 2960|      1|                    }
 2961|  1.86M|                    if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2961:25): [True: 0, False: 1.86M]
  ------------------
 2962|      0|                        throw makeError(
 2963|      0|                            ast.location,
 2964|      0|                            "super index must be string, got " + type_str(scratch) + ".");
 2965|      0|                    }
 2966|       |
 2967|  1.86M|                    const UString &index_name = static_cast<HeapString *>(scratch.v.h)->value;
 2968|  1.86M|                    auto *fid = alloc->makeIdentifier(index_name);
 2969|  1.86M|                    stack.pop();
 2970|  1.86M|                    ast_ = objectIndex(ast.location, self, fid, offset);
 2971|  1.86M|                    goto recurse;
 2972|  1.86M|                } break;
 2973|       |
 2974|  2.09M|                case FRAME_IN_SUPER_ELEMENT: {
  ------------------
  |  Branch (2974:17): [True: 2.09M, False: 131M]
  ------------------
 2975|  2.09M|                    const auto &ast = *static_cast<const InSuper *>(f.ast);
 2976|  2.09M|                    HeapObject *self;
 2977|  2.09M|                    unsigned offset;
 2978|  2.09M|                    stack.getSelfBinding(self, offset);
 2979|  2.09M|                    offset++;
 2980|  2.09M|                    if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2980:25): [True: 2, False: 2.09M]
  ------------------
 2981|      2|                        throw makeError(ast.location,
 2982|      2|                                        "left hand side of e in super must be string, got " +
 2983|      2|                                            type_str(scratch) + ".");
 2984|      2|                    }
 2985|  2.09M|                    if (offset >= countLeaves(self)) {
  ------------------
  |  Branch (2985:25): [True: 181k, False: 1.91M]
  ------------------
 2986|       |                        // There is no super object.
 2987|   181k|                        scratch = makeBoolean(false);
 2988|  1.91M|                    } else {
 2989|  1.91M|                        const UString &element_name = static_cast<HeapString *>(scratch.v.h)->value;
 2990|  1.91M|                        auto *fid = alloc->makeIdentifier(element_name);
 2991|  1.91M|                        unsigned unused_found_at = 0;
 2992|  1.91M|                        bool in = findObject(fid, self, offset, unused_found_at);
 2993|  1.91M|                        scratch = makeBoolean(in);
 2994|  1.91M|                    }
 2995|  2.09M|                } break;
 2996|       |
 2997|  10.5M|                case FRAME_INDEX_INDEX: {
  ------------------
  |  Branch (2997:17): [True: 10.5M, False: 122M]
  ------------------
 2998|  10.5M|                    const auto &ast = *static_cast<const Index *>(f.ast);
 2999|  10.5M|                    const Value &target = f.val;
 3000|  10.5M|                    if (target.t == Value::ARRAY) {
  ------------------
  |  Branch (3000:25): [True: 180k, False: 10.3M]
  ------------------
 3001|   180k|                        const auto *array = static_cast<HeapArray *>(target.v.h);
 3002|   180k|                        if (scratch.t == Value::STRING) {
  ------------------
  |  Branch (3002:29): [True: 88, False: 180k]
  ------------------
 3003|     88|                            const UString &str = static_cast<HeapString *>(scratch.v.h)->value;
 3004|     88|                            throw makeError(
 3005|     88|                                ast.location,
 3006|     88|                                "attempted index an array with string \""
 3007|     88|                                + encode_utf8(jsonnet_string_escape(str, false)) + "\".");
 3008|     88|                        }
 3009|   180k|                        if (scratch.t != Value::NUMBER) {
  ------------------
  |  Branch (3009:29): [True: 7, False: 180k]
  ------------------
 3010|      7|                            throw makeError(
 3011|      7|                                ast.location,
 3012|      7|                                "array index must be number, got " + type_str(scratch) + ".");
 3013|      7|                        }
 3014|   180k|                        double index = ::floor(scratch.v.d);
 3015|   180k|                        long sz = array->elements.size();
 3016|   180k|                        if (index < 0 || index >= sz) {
  ------------------
  |  Branch (3016:29): [True: 1, False: 180k]
  |  Branch (3016:42): [True: 9, False: 180k]
  ------------------
 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|   180k|                        if (scratch.v.d != index) {
  ------------------
  |  Branch (3022:29): [True: 1, False: 180k]
  ------------------
 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|   180k|                        auto *thunk = array->elements[size_t(index)];
 3029|   180k|                        if (thunk->filled) {
  ------------------
  |  Branch (3029:29): [True: 94.6k, False: 85.7k]
  ------------------
 3030|  94.6k|                            scratch = thunk->content;
 3031|  94.6k|                        } else {
 3032|  85.7k|                            stack.pop();
 3033|  85.7k|                            stack.newCall(
 3034|  85.7k|                                ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 3035|  85.7k|                            ast_ = thunk->body;
 3036|  85.7k|                            goto recurse;
 3037|  85.7k|                        }
 3038|  10.3M|                    } else if (target.t == Value::OBJECT) {
  ------------------
  |  Branch (3038:32): [True: 10.0M, False: 256k]
  ------------------
 3039|  10.0M|                        auto *obj = static_cast<HeapObject *>(target.v.h);
 3040|  10.0M|                        assert(obj != nullptr);
  ------------------
  |  Branch (3040:25): [True: 10.0M, False: 0]
  ------------------
 3041|  10.0M|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (3041:29): [True: 7, False: 10.0M]
  ------------------
 3042|      7|                            throw makeError(
 3043|      7|                                ast.location,
 3044|      7|                                "object index must be string, got " + type_str(scratch) + ".");
 3045|      7|                        }
 3046|  10.0M|                        const UString &index_name = static_cast<HeapString *>(scratch.v.h)->value;
 3047|  10.0M|                        auto *fid = alloc->makeIdentifier(index_name);
 3048|  10.0M|                        stack.pop();
 3049|  10.0M|                        ast_ = objectIndex(ast.location, obj, fid, 0);
 3050|  10.0M|                        goto recurse;
 3051|  10.0M|                    } else if (target.t == Value::STRING) {
  ------------------
  |  Branch (3051:32): [True: 256k, False: 0]
  ------------------
 3052|   256k|                        auto *obj = static_cast<HeapString *>(target.v.h);
 3053|   256k|                        assert(obj != nullptr);
  ------------------
  |  Branch (3053:25): [True: 256k, False: 0]
  ------------------
 3054|   256k|                        if (scratch.t != Value::NUMBER) {
  ------------------
  |  Branch (3054:29): [True: 6, False: 256k]
  ------------------
 3055|      6|                            throw makeError(
 3056|      6|                                ast.location,
 3057|      6|                                "string index must be a number, got " + type_str(scratch) + ".");
 3058|      6|                        }
 3059|   256k|                        long sz = obj->value.length();
 3060|   256k|                        long i = (long)scratch.v.d;
 3061|   256k|                        if (i < 0 || i >= sz) {
  ------------------
  |  Branch (3061:29): [True: 52, False: 256k]
  |  Branch (3061:38): [True: 54, False: 256k]
  ------------------
 3062|    106|                            std::stringstream ss;
 3063|    106|                            ss << "string bounds error: " << i << " not within [0, " << sz << ")";
 3064|    106|                            throw makeError(ast.location, ss.str());
 3065|    106|                        }
 3066|   256k|                        char32_t ch[] = {obj->value[i], U'\0'};
 3067|   256k|                        scratch = makeString(ch);
 3068|   256k|                    } else {
 3069|      0|                        std::cerr << "INTERNAL ERROR: not object / array / string." << std::endl;
 3070|      0|                        abort();
 3071|      0|                    }
 3072|  10.5M|                } break;
 3073|       |
 3074|  10.5M|                case FRAME_INDEX_TARGET: {
  ------------------
  |  Branch (3074:17): [True: 10.5M, False: 122M]
  ------------------
 3075|  10.5M|                    const auto &ast = *static_cast<const Index *>(f.ast);
 3076|  10.5M|                    if (scratch.t != Value::ARRAY && scratch.t != Value::OBJECT &&
  ------------------
  |  Branch (3076:25): [True: 10.3M, False: 180k]
  |  Branch (3076:54): [True: 256k, False: 10.0M]
  ------------------
 3077|   256k|                        scratch.t != Value::STRING) {
  ------------------
  |  Branch (3077:25): [True: 11, False: 256k]
  ------------------
 3078|     11|                        throw makeError(ast.location,
 3079|     11|                                        "can only index objects, strings, and arrays, got " +
 3080|     11|                                            type_str(scratch) + ".");
 3081|     11|                    }
 3082|  10.5M|                    f.val = scratch;
 3083|  10.5M|                    f.kind = FRAME_INDEX_INDEX;
 3084|  10.5M|                    if (scratch.t == Value::OBJECT) {
  ------------------
  |  Branch (3084:25): [True: 10.0M, False: 436k]
  ------------------
 3085|  10.0M|                        auto *self = static_cast<HeapObject *>(scratch.v.h);
 3086|  10.0M|                        if (!stack.alreadyExecutingInvariants(self)) {
  ------------------
  |  Branch (3086:29): [True: 10.0M, False: 17.0k]
  ------------------
 3087|  10.0M|                            stack.newFrame(FRAME_INVARIANTS, ast.location);
 3088|  10.0M|                            Frame &f2 = stack.top();
 3089|  10.0M|                            f2.self = self;
 3090|  10.0M|                            unsigned counter = 0;
 3091|  10.0M|                            objectInvariants(self, self, counter, f2.thunks);
 3092|  10.0M|                            if (f2.thunks.size() > 0) {
  ------------------
  |  Branch (3092:33): [True: 1.00k, False: 10.0M]
  ------------------
 3093|  1.00k|                                auto *thunk = f2.thunks[0];
 3094|  1.00k|                                f2.elementId = 1;
 3095|  1.00k|                                stack.newCall(ast.location,
 3096|  1.00k|                                              thunk,
 3097|  1.00k|                                              thunk->self,
 3098|  1.00k|                                              thunk->offset,
 3099|  1.00k|                                              thunk->upValues);
 3100|  1.00k|                                ast_ = thunk->body;
 3101|  1.00k|                                goto recurse;
 3102|  1.00k|                            }
 3103|  10.0M|                        }
 3104|  10.0M|                    }
 3105|  10.5M|                    ast_ = ast.index;
 3106|  10.5M|                    goto recurse;
 3107|  10.5M|                } break;
 3108|       |
 3109|  10.0M|                case FRAME_INVARIANTS: {
  ------------------
  |  Branch (3109:17): [True: 10.0M, False: 123M]
  ------------------
 3110|  10.0M|                    if (f.elementId >= f.thunks.size()) {
  ------------------
  |  Branch (3110:25): [True: 10.0M, False: 13.0k]
  ------------------
 3111|  10.0M|                        if (stack.size() == initial_stack_size + 1) {
  ------------------
  |  Branch (3111:29): [True: 8.10k, False: 10.0M]
  ------------------
 3112|       |                            // Just pop, evaluate was invoked by runInvariants.
 3113|  8.10k|                            break;
 3114|  8.10k|                        }
 3115|  10.0M|                        stack.pop();
 3116|  10.0M|                        Frame &f2 = stack.top();
 3117|  10.0M|                        const auto &ast = *static_cast<const Index *>(f2.ast);
 3118|  10.0M|                        ast_ = ast.index;
 3119|  10.0M|                        goto recurse;
 3120|  10.0M|                    }
 3121|  13.0k|                    auto *thunk = f.thunks[f.elementId++];
 3122|  13.0k|                    stack.newCall(f.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 3123|  13.0k|                    ast_ = thunk->body;
 3124|  13.0k|                    goto recurse;
 3125|  10.0M|                } break;
 3126|       |
 3127|  4.80M|                case FRAME_LOCAL: {
  ------------------
  |  Branch (3127:17): [True: 4.80M, False: 128M]
  ------------------
 3128|       |                    // Result of execution is in scratch already.
 3129|  4.80M|                } break;
 3130|       |
 3131|  2.04M|                case FRAME_OBJECT: {
  ------------------
  |  Branch (3131:17): [True: 2.04M, False: 131M]
  ------------------
 3132|  2.04M|                    const auto &ast = *static_cast<const DesugaredObject *>(f.ast);
 3133|  2.04M|                    if (scratch.t != Value::NULL_TYPE) {
  ------------------
  |  Branch (3133:25): [True: 2.04M, False: 0]
  ------------------
 3134|  2.04M|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (3134:29): [True: 18, False: 2.04M]
  ------------------
 3135|     18|                            throw makeError(ast.location, "field name was not a string.");
 3136|     18|                        }
 3137|  2.04M|                        const auto &fname = static_cast<const HeapString *>(scratch.v.h)->value;
 3138|  2.04M|                        const Identifier *fid = alloc->makeIdentifier(fname);
 3139|  2.04M|                        if (f.objectFields.find(fid) != f.objectFields.end()) {
  ------------------
  |  Branch (3139:29): [True: 5, False: 2.04M]
  ------------------
 3140|      5|                            std::string msg =
 3141|      5|                                "duplicate field name: \"" + encode_utf8(fname) + "\"";
 3142|      5|                            throw makeError(ast.location, msg);
 3143|      5|                        }
 3144|  2.04M|                        f.objectFields[fid].hide = f.fit->hide;
 3145|  2.04M|                        f.objectFields[fid].body = f.fit->body;
 3146|  2.04M|                    }
 3147|  2.04M|                    f.fit++;
 3148|  2.04M|                    if (f.fit != ast.fields.end()) {
  ------------------
  |  Branch (3148:25): [True: 1.33M, False: 714k]
  ------------------
 3149|  1.33M|                        ast_ = f.fit->name;
 3150|  1.33M|                        goto recurse;
 3151|  1.33M|                    } else {
 3152|   714k|                        auto env = capture(ast.freeVariables);
 3153|   714k|                        scratch = makeObject<HeapSimpleObject>(env, f.objectFields, ast.asserts);
 3154|   714k|                    }
 3155|  2.04M|                } break;
 3156|       |
 3157|   714k|                case FRAME_OBJECT_COMP_ARRAY: {
  ------------------
  |  Branch (3157:17): [True: 0, False: 133M]
  ------------------
 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: 133M]
  ------------------
 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|  1.14M|                case FRAME_STRING_CONCAT: {
  ------------------
  |  Branch (3209:17): [True: 1.14M, False: 132M]
  ------------------
 3210|  1.14M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 3211|  1.14M|                    const Value &lhs = stack.top().val;
 3212|  1.14M|                    UString output;
 3213|  1.14M|                    if (lhs.t == Value::STRING) {
  ------------------
  |  Branch (3213:25): [True: 1.11M, False: 23.2k]
  ------------------
 3214|  1.11M|                        output.append(static_cast<const HeapString *>(lhs.v.h)->value);
 3215|  1.11M|                    } else {
 3216|  23.2k|                        scratch = lhs;
 3217|  23.2k|                        output.append(toString(ast.left->location));
 3218|  23.2k|                    }
 3219|  1.14M|                    const Value &rhs = stack.top().val2;
 3220|  1.14M|                    if (rhs.t == Value::STRING) {
  ------------------
  |  Branch (3220:25): [True: 928k, False: 213k]
  ------------------
 3221|   928k|                        output.append(static_cast<const HeapString *>(rhs.v.h)->value);
 3222|   928k|                    } else {
 3223|   213k|                        scratch = rhs;
 3224|   213k|                        output.append(toString(ast.right->location));
 3225|   213k|                    }
 3226|  1.14M|                    scratch = makeString(output);
 3227|  1.14M|                } break;
 3228|       |
 3229|  1.81M|                case FRAME_UNARY: {
  ------------------
  |  Branch (3229:17): [True: 1.81M, False: 131M]
  ------------------
 3230|  1.81M|                    const auto &ast = *static_cast<const Unary *>(f.ast);
 3231|  1.81M|                    switch (scratch.t) {
 3232|  1.67M|                        case Value::BOOLEAN:
  ------------------
  |  Branch (3232:25): [True: 1.67M, False: 142k]
  ------------------
 3233|  1.67M|                            if (ast.op == UOP_NOT) {
  ------------------
  |  Branch (3233:33): [True: 1.67M, False: 2]
  ------------------
 3234|  1.67M|                                scratch = makeBoolean(!scratch.v.b);
 3235|  1.67M|                            } 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.67M|                            break;
 3241|       |
 3242|  1.67M|                        case Value::NUMBER:
  ------------------
  |  Branch (3242:25): [True: 141k, False: 1.67M]
  ------------------
 3243|   141k|                            switch (ast.op) {
 3244|  5.50k|                                case UOP_PLUS: break;
  ------------------
  |  Branch (3244:33): [True: 5.50k, False: 136k]
  ------------------
 3245|       |
 3246|   120k|                                case UOP_MINUS: scratch = makeNumber(-scratch.v.d); break;
  ------------------
  |  Branch (3246:33): [True: 120k, False: 21.3k]
  ------------------
 3247|       |
 3248|  15.7k|                                case UOP_BITWISE_NOT:
  ------------------
  |  Branch (3248:33): [True: 15.7k, False: 126k]
  ------------------
 3249|  15.7k|                                    scratch = makeNumber(~(long)(scratch.v.d));
 3250|  15.7k|                                    break;
 3251|       |
 3252|     20|                                default:
  ------------------
  |  Branch (3252:33): [True: 20, False: 141k]
  ------------------
 3253|     20|                                    throw makeError(ast.location,
 3254|     20|                                                    "unary operator " + uop_string(ast.op) +
 3255|     20|                                                        " does not operate on numbers.");
 3256|   141k|                            }
 3257|   141k|                            break;
 3258|       |
 3259|   141k|                        default:
  ------------------
  |  Branch (3259:25): [True: 117, False: 1.81M]
  ------------------
 3260|    117|                            throw makeError(ast.location,
 3261|    117|                                            "unary operator " + uop_string(ast.op) +
 3262|    117|                                                " does not operate on type " + type_str(scratch));
 3263|  1.81M|                    }
 3264|  1.81M|                } break;
 3265|       |
 3266|  1.81M|                case FRAME_BUILTIN_JOIN_STRINGS: {
  ------------------
  |  Branch (3266:17): [True: 0, False: 133M]
  ------------------
 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: 133M]
  ------------------
 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: 133M]
  ------------------
 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: 133M]
  ------------------
 3295|      0|                    std::cerr << "INTERNAL ERROR: Unknown FrameKind:  " << f.kind << std::endl;
 3296|      0|                    std::abort();
 3297|   133M|            }
 3298|       |
 3299|  58.6M|        popframe:;
 3300|       |
 3301|  58.6M|            stack.pop();
 3302|       |
 3303|  69.3M|        replaceframe:;
 3304|  69.3M|        }
 3305|  69.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack8newFrameIJNS1_9FrameKindEPKNS0_3ASTEEEEvDpT_:
  388|  53.2M|    {
  389|  53.2M|        stack.emplace_back(args...);
  390|  53.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15FrameC2ERKNS1_9FrameKindEPKNS0_3ASTE:
  194|  53.2M|        : kind(kind),
  195|  53.2M|          ast(ast),
  196|  53.2M|          location(ast->location),
  197|  53.2M|          tailCall(false),
  198|  53.2M|          elementId(0),
  199|  53.2M|          first(false),
  200|  53.2M|          context(NULL),
  201|  53.2M|          self(NULL),
  202|  53.2M|          offset(0)
  203|  53.2M|    {
  204|  53.2M|        val.t = Value::NULL_TYPE;
  205|  53.2M|        val2.t = Value::NULL_TYPE;
  206|  53.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack14getSelfBindingERPNS1_10HeapObjectERj:
  444|  31.8M|    {
  445|  31.8M|        self = nullptr;
  446|  31.8M|        offset = 0;
  447|   106M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (447:40): [True: 106M, False: 17.8k]
  ------------------
  448|   106M|            if (stack[i].isCall()) {
  ------------------
  |  Branch (448:17): [True: 31.8M, False: 75.1M]
  ------------------
  449|  31.8M|                self = stack[i].self;
  450|  31.8M|                offset = stack[i].offset;
  451|  31.8M|                return;
  452|  31.8M|            }
  453|   106M|        }
  454|  31.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  577|  27.0M|    {
  578|  27.0M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  27.0M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 22.5k, False: 27.0M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  22.5k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  22.5k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  22.5k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  22.5k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 22.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|  3.63M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 3.63M, False: 22.5k]
  ------------------
  597|  3.63M|                heap.markFrom(sourceVal.second);
  598|  3.63M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  22.5k|            heap.sweep();
  602|  22.5k|        }
  603|  27.0M|        return r;
  604|  27.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter7captureERKNSt3__16vectorIPKNS0_10IdentifierENS3_9allocatorIS7_EEEE:
  861|  48.8M|    {
  862|  48.8M|        BindingFrame env;
  863|   944M|        for (auto fv : free_vars) {
  ------------------
  |  Branch (863:22): [True: 944M, False: 48.8M]
  ------------------
  864|   944M|            auto *th = stack.lookUpVar(fv);
  865|   944M|            env[fv] = th;
  866|   944M|        }
  867|  48.8M|        return env;
  868|  48.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack8newFrameIJNS1_9FrameKindENS0_13LocationRangeEEEEvDpT_:
  388|  10.6M|    {
  389|  10.6M|        stack.emplace_back(args...);
  390|  10.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeClosureERKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS3_4lessIS7_EENS3_9allocatorINS3_4pairIKS7_S9_EEEEEEPNS1_10HeapObjectEjRKNS3_6vectorINS1_11HeapClosure5ParamENSC_ISO_EEEEPNS0_3ASTE:
  650|  1.94M|    {
  651|  1.94M|        Value r;
  652|  1.94M|        r.t = Value::FUNCTION;
  653|  1.94M|        r.v.h = makeHeap<HeapClosure>(env, self, offset, params, body, "");
  654|  1.94M|        return r;
  655|  1.94M|    }
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.94M|    {
  578|  1.94M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  1.94M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 3.41k, False: 1.94M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  3.41k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  3.41k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  3.41k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  3.41k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 3.41k]
  ------------------
  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|   550k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 550k, False: 3.41k]
  ------------------
  597|   550k|                heap.markFrom(sourceVal.second);
  598|   550k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  3.41k|            heap.sweep();
  602|  3.41k|        }
  603|  1.94M|        return r;
  604|  1.94M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter6importERKNS0_13LocationRangeEPKNS0_13LiteralStringE:
  792|     51|    {
  793|     51|        ImportCacheValue *input = importData(loc, file);
  794|     51|        if (input->thunk == nullptr) {
  ------------------
  |  Branch (794:13): [True: 0, False: 51]
  ------------------
  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|     51|        return input->thunk;
  804|     51|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10importDataERKNS0_13LocationRangeEPKNS0_13LiteralStringE:
  816|     71|    {
  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|     71|        std::string dir = path_dir_with_trailing_separator(loc.file);
  822|       |
  823|     71|        const UString &path = file->value;
  824|       |
  825|     71|        std::pair<std::string, UString> key(dir, path);
  826|     71|        ImportCacheValue *cached_value = cachedImports[key];
  827|     71|        if (cached_value != nullptr)
  ------------------
  |  Branch (827:13): [True: 0, False: 71]
  ------------------
  828|      0|            return cached_value;
  829|       |
  830|     71|        char *found_here_cptr;
  831|     71|        char *buf = NULL;
  832|     71|        size_t buflen = 0;
  833|     71|        int result = importCallback(importCallbackContext,
  834|     71|                                    dir.c_str(),
  835|     71|                                    encode_utf8(path).c_str(),
  836|     71|                                    &found_here_cptr,
  837|     71|                                    &buf,
  838|     71|                                    &buflen);
  839|       |
  840|     71|        std::string input(buf, buflen);
  841|     71|        ::free(buf);
  842|       |
  843|     71|        if (result == 1) {  // failure
  ------------------
  |  Branch (843:13): [True: 71, False: 0]
  ------------------
  844|     71|            std::string epath = encode_utf8(jsonnet_string_escape(path, false));
  845|     71|            std::string msg = "couldn't open import \"" + epath + "\": ";
  846|     71|            msg += input;
  847|     71|            throw makeError(loc, msg);
  848|     71|        }
  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|     71|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRKPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  577|  17.5M|    {
  578|  17.5M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  17.5M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 22.1k, False: 17.5M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  22.1k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  22.1k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  22.1k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  22.1k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 22.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|  3.56M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 3.56M, False: 22.1k]
  ------------------
  597|  3.56M|                heap.markFrom(sourceVal.second);
  598|  3.56M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  22.1k|            heap.sweep();
  602|  22.1k|        }
  603|  17.5M|        return r;
  604|  17.5M|    }
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.10k, False: 1.54M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  2.10k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  2.10k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  2.10k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  2.10k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 2.10k]
  ------------------
  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|   339k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 339k, False: 2.10k]
  ------------------
  597|   339k|                heap.markFrom(sourceVal.second);
  598|   339k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  2.10k|            heap.sweep();
  602|  2.10k|        }
  603|  1.54M|        return r;
  604|  1.54M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack9lookUpVarEPKNS0_10IdentifierE:
  269|   970M|    {
  270|  1.37G|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (270:40): [True: 1.37G, False: 0]
  ------------------
  271|  1.37G|            const auto &binds = stack[i].bindings;
  272|  1.37G|            auto it = binds.find(id);
  273|  1.37G|            if (it != binds.end()) {
  ------------------
  |  Branch (273:17): [True: 970M, False: 409M]
  ------------------
  274|   970M|                return it->second;
  275|   970M|            }
  276|   409M|            if (stack[i].isCall())
  ------------------
  |  Branch (276:17): [True: 0, False: 409M]
  ------------------
  277|      0|                break;
  278|   409M|        }
  279|      0|        return nullptr;
  280|   970M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack4sizeEv:
  263|   155M|    {
  264|   155M|        return stack.size();
  265|   155M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPKNS0_3ASTEEEEPT_DpOT0_:
  577|    106|    {
  578|    106|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|    106|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 106]
  ------------------
  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|    106|        return r;
  604|    106|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10findObjectEPKNS0_10IdentifierEPNS1_10HeapObjectEjRj:
  698|   724M|    {
  699|   724M|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(curr)) {
  ------------------
  |  Branch (699:19): [True: 357M, False: 366M]
  ------------------
  700|   357M|            auto *r = findObject(f, ext->right, start_from, counter);
  701|   357M|            if (r)
  ------------------
  |  Branch (701:17): [True: 5.22M, False: 352M]
  ------------------
  702|  5.22M|                return r;
  703|   352M|            auto *l = findObject(f, ext->left, start_from, counter);
  704|   352M|            if (l)
  ------------------
  |  Branch (704:17): [True: 283M, False: 69.2M]
  ------------------
  705|   283M|                return l;
  706|   366M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(curr)) {
  ------------------
  |  Branch (706:26): [True: 0, False: 366M]
  ------------------
  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|   366M|        } else {
  717|   366M|            if (counter >= start_from) {
  ------------------
  |  Branch (717:17): [True: 31.3M, False: 335M]
  ------------------
  718|  31.3M|                if (auto *simp = dynamic_cast<HeapSimpleObject *>(curr)) {
  ------------------
  |  Branch (718:27): [True: 31.3M, False: 0]
  ------------------
  719|  31.3M|                    auto it = simp->fields.find(f);
  720|  31.3M|                    if (it != simp->fields.end()) {
  ------------------
  |  Branch (720:25): [True: 14.4M, False: 16.8M]
  ------------------
  721|  14.4M|                        return simp;
  722|  14.4M|                    }
  723|  31.3M|                } 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|  31.3M|            }
  730|   352M|            counter++;
  731|   352M|        }
  732|   421M|        return nullptr;
  733|   724M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13callSourceValEPKNS0_3ASTEPNS1_9HeapThunkENSt3__16vectorIS7_NS8_9allocatorIS7_EEEE:
 2070|  32.3k|    const AST *callSourceVal(const AST *ast, HeapThunk *sourceVal, std::vector<HeapThunk*> args) {
 2071|  32.3k|        assert(sourceVal != nullptr);
  ------------------
  |  Branch (2071:9): [True: 32.3k, False: 0]
  ------------------
 2072|  32.3k|        assert(sourceVal->filled);
  ------------------
  |  Branch (2072:9): [True: 32.3k, False: 0]
  ------------------
 2073|  32.3k|        assert(sourceVal->content.t == Value::FUNCTION);
  ------------------
  |  Branch (2073:9): [True: 32.3k, False: 0]
  ------------------
 2074|  32.3k|        auto *func = static_cast<HeapClosure *>(sourceVal->content.v.h);
 2075|  32.3k|        BindingFrame up_values = func->upValues;
 2076|  97.1k|        for (size_t i = 0; i < args.size(); ++i) {
  ------------------
  |  Branch (2076:28): [True: 64.7k, False: 32.3k]
  ------------------
 2077|  64.7k|            up_values.insert({func->params[i].id, args[i]});
 2078|  64.7k|        }
 2079|  32.3k|        stack.newCall(ast->location, func, func->self, func->offset, up_values);
 2080|  32.3k|        return func->body;
 2081|  32.3k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter17safeDoubleToInt64EdRKNS0_13LocationRangeE:
  919|  78.4k|    int64_t safeDoubleToInt64(double value, const internal::LocationRange& loc) {
  920|  78.4k|        if (std::isnan(value) || std::isinf(value)) {
  ------------------
  |  Branch (920:13): [True: 0, False: 78.4k]
  |  Branch (920:34): [True: 0, False: 78.4k]
  ------------------
  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|  78.4k|        constexpr int64_t DOUBLE_MAX_SAFE_INTEGER = (1LL << 53) - 1;
  927|  78.4k|        constexpr int64_t DOUBLE_MIN_SAFE_INTEGER = -((1LL << 53) - 1);
  928|       |
  929|       |        // Check if the value is within the safe integer range
  930|  78.4k|        if (value < DOUBLE_MIN_SAFE_INTEGER || value > DOUBLE_MAX_SAFE_INTEGER) {
  ------------------
  |  Branch (930:13): [True: 2, False: 78.4k]
  |  Branch (930:48): [True: 3, False: 78.3k]
  ------------------
  931|      5|            throw makeError(loc, "numeric value outside safe integer range for bitwise operation.");
  932|      5|        }
  933|  78.3k|        return static_cast<int64_t>(value);
  934|  78.4k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeObjectINS1_18HeapExtendedObjectEJPNS1_10HeapObjectES6_EEENS1_5ValueEDpT0_:
  671|   998k|    {
  672|   998k|        Value r;
  673|   998k|        r.t = Value::OBJECT;
  674|   998k|        r.v.h = makeHeap<T>(args...);
  675|   998k|        return r;
  676|   998k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_18HeapExtendedObjectEJRPNS1_10HeapObjectES7_EEEPT_DpOT0_:
  577|   998k|    {
  578|   998k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   998k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 1.05k, False: 997k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  1.05k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  1.05k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  1.05k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  1.05k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 1.05k]
  ------------------
  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|   170k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 170k, False: 1.05k]
  ------------------
  597|   170k|                heap.markFrom(sourceVal.second);
  598|   170k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  1.05k|            heap.sweep();
  602|  1.05k|        }
  603|   998k|        return r;
  604|   998k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8toStringERKNS0_13LocationRangeE:
 1979|   236k|    {
 1980|   236k|        return manifestJson(loc, false, U"");
 1981|   236k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11countLeavesEPNS1_10HeapObjectE:
  876|  1.95G|    {
  877|  1.95G|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(obj)) {
  ------------------
  |  Branch (877:19): [True: 973M, False: 977M]
  ------------------
  878|   973M|            return countLeaves(ext->left) + countLeaves(ext->right);
  879|   977M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(obj)) {
  ------------------
  |  Branch (879:26): [True: 0, False: 977M]
  ------------------
  880|      0|            return countLeaves(ext->obj) + 1;
  881|   977M|        } else {
  882|       |            // Must be a HeapLeafObject.
  883|   977M|            return 1;
  884|   977M|        }
  885|  1.95G|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11objectIndexERKNS0_13LocationRangeEPNS1_10HeapObjectEPKNS0_10IdentifierEj:
 2018|  12.6M|    {
 2019|  12.6M|        unsigned found_at = 0;
 2020|  12.6M|        HeapObject *self = obj;
 2021|  12.6M|        HeapLeafObject *found = findObject(f, obj, offset, found_at);
 2022|  12.6M|        if (found == nullptr) {
  ------------------
  |  Branch (2022:13): [True: 17, False: 12.6M]
  ------------------
 2023|     17|            throw makeError(loc, "field does not exist: " + encode_utf8(f->name));
 2024|     17|        }
 2025|  12.6M|        if (auto *simp = dynamic_cast<HeapSimpleObject *>(found)) {
  ------------------
  |  Branch (2025:19): [True: 12.6M, False: 0]
  ------------------
 2026|  12.6M|            auto it = simp->fields.find(f);
 2027|  12.6M|            const AST *body = it->second.body;
 2028|       |
 2029|  12.6M|            stack.newCall(loc, simp, self, found_at, simp->upValues);
 2030|  12.6M|            return body;
 2031|  12.6M|        } 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|  12.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack26alreadyExecutingInvariantsEPNS1_10HeapObjectE:
  458|  10.6M|    {
  459|  3.08G|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (459:40): [True: 3.07G, False: 10.6M]
  ------------------
  460|  3.07G|            if (stack[i].kind == FRAME_INVARIANTS) {
  ------------------
  |  Branch (460:17): [True: 15.7M, False: 3.05G]
  ------------------
  461|  15.7M|                if (stack[i].self == self)
  ------------------
  |  Branch (461:21): [True: 19.0k, False: 15.7M]
  ------------------
  462|  19.0k|                    return true;
  463|  15.7M|            }
  464|  3.07G|        }
  465|  10.6M|        return false;
  466|  10.6M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter16objectInvariantsEPNS1_10HeapObjectES4_RjRNSt3__16vectorIPNS1_9HeapThunkENS6_9allocatorIS9_EEEE:
 1992|  41.9M|    {
 1993|  41.9M|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(curr)) {
  ------------------
  |  Branch (1993:19): [True: 15.6M, False: 26.3M]
  ------------------
 1994|  15.6M|            objectInvariants(ext->right, self, counter, thunks);
 1995|  15.6M|            objectInvariants(ext->left, self, counter, thunks);
 1996|  26.3M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(curr)) {
  ------------------
  |  Branch (1996:26): [True: 0, False: 26.3M]
  ------------------
 1997|      0|            objectInvariants(ext->obj, self, counter, thunks);
 1998|  26.3M|        } else {
 1999|  26.3M|            if (auto *simp = dynamic_cast<HeapSimpleObject *>(curr)) {
  ------------------
  |  Branch (1999:23): [True: 26.3M, False: 0]
  ------------------
 2000|  26.3M|                for (AST *assert : simp->asserts) {
  ------------------
  |  Branch (2000:34): [True: 2.07M, False: 26.3M]
  ------------------
 2001|  2.07M|                    auto *el_th = makeHeap<HeapThunk>(idInvariant, self, counter, assert);
 2002|  2.07M|                    el_th->upValues = simp->upValues;
 2003|  2.07M|                    thunks.push_back(el_th);
 2004|  2.07M|                }
 2005|  26.3M|            }
 2006|  26.3M|            counter++;
 2007|  26.3M|        }
 2008|  41.9M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRPNS0_3ASTEEEEPT_DpOT0_:
  577|  2.07M|    {
  578|  2.07M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  2.07M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 197, False: 2.07M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|    197|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|    197|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|    197|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|    197|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 197]
  ------------------
  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|  31.7k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 31.7k, False: 197]
  ------------------
  597|  31.7k|                heap.markFrom(sourceVal.second);
  598|  31.7k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|    197|            heap.sweep();
  602|    197|        }
  603|  2.07M|        return r;
  604|  2.07M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12manifestJsonERKNS0_13LocationRangeEbRKNSt3__112basic_stringIDiNS6_11char_traitsIDiEENS6_9allocatorIDiEEEE:
 3315|  5.97M|    {
 3316|       |        // Printing fields means evaluating and binding them, which can trigger
 3317|       |        // garbage collection.
 3318|       |
 3319|  5.97M|        UStringStream ss;
 3320|  5.97M|        switch (scratch.t) {
  ------------------
  |  Branch (3320:17): [True: 5.97M, False: 0]
  ------------------
 3321|   126k|            case Value::ARRAY: {
  ------------------
  |  Branch (3321:13): [True: 126k, False: 5.85M]
  ------------------
 3322|   126k|                HeapArray *arr = static_cast<HeapArray *>(scratch.v.h);
 3323|   126k|                if (arr->elements.size() == 0) {
  ------------------
  |  Branch (3323:21): [True: 25.6k, False: 100k]
  ------------------
 3324|  25.6k|                    ss << U"[ ]";
 3325|   100k|                } else {
 3326|   100k|                    const char32_t *prefix = multiline ? U"[\n" : U"[";
  ------------------
  |  Branch (3326:46): [True: 76.7k, False: 24.1k]
  ------------------
 3327|   100k|                    UString indent2 = multiline ? indent + U"   " : indent;
  ------------------
  |  Branch (3327:39): [True: 76.7k, False: 24.1k]
  ------------------
 3328|  5.10M|                    for (auto *thunk : arr->elements) {
  ------------------
  |  Branch (3328:38): [True: 5.10M, False: 100k]
  ------------------
 3329|  5.10M|                        LocationRange tloc = thunk->body == nullptr ? loc : thunk->body->location;
  ------------------
  |  Branch (3329:46): [True: 0, False: 5.10M]
  ------------------
 3330|  5.10M|                        if (thunk->filled) {
  ------------------
  |  Branch (3330:29): [True: 0, False: 5.10M]
  ------------------
 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|  5.10M|                        } else {
 3336|  5.10M|                            stack.newCall(loc, thunk, thunk->self, thunk->offset, thunk->upValues);
 3337|       |                            // Keep arr alive when scratch is overwritten
 3338|  5.10M|                            stack.top().val = scratch;
 3339|  5.10M|                            evaluate(thunk->body, stack.size());
 3340|  5.10M|                        }
 3341|  5.10M|                        auto element = manifestJson(tloc, multiline, indent2);
 3342|       |                        // Restore scratch
 3343|  5.10M|                        scratch = stack.top().val;
 3344|  5.10M|                        stack.pop();
 3345|  5.10M|                        ss << prefix << indent2 << element;
 3346|  5.10M|                        prefix = multiline ? U",\n" : U", ";
  ------------------
  |  Branch (3346:34): [True: 2.27M, False: 2.83M]
  ------------------
 3347|  5.10M|                    }
 3348|   100k|                    ss << (multiline ? U"\n" : U"") << indent << U"]";
  ------------------
  |  Branch (3348:28): [True: 58.3k, False: 42.5k]
  ------------------
 3349|   100k|                }
 3350|   126k|            } break;
 3351|       |
 3352|  78.8k|            case Value::BOOLEAN: ss << (scratch.v.b ? U"true" : U"false"); break;
  ------------------
  |  Branch (3352:13): [True: 78.8k, False: 5.89M]
  |  Branch (3352:41): [True: 21.5k, False: 57.3k]
  ------------------
 3353|       |
 3354|  5.18M|            case Value::NUMBER: ss << decode_utf8(jsonnet_unparse_number(scratch.v.d)); break;
  ------------------
  |  Branch (3354:13): [True: 5.18M, False: 791k]
  ------------------
 3355|       |
 3356|     29|            case Value::FUNCTION:
  ------------------
  |  Branch (3356:13): [True: 29, False: 5.97M]
  ------------------
 3357|     29|                throw makeError(loc, "couldn't manifest function in JSON output.");
 3358|       |
 3359|  1.52k|            case Value::NULL_TYPE: ss << U"null"; break;
  ------------------
  |  Branch (3359:13): [True: 1.52k, False: 5.97M]
  ------------------
 3360|       |
 3361|   549k|            case Value::OBJECT: {
  ------------------
  |  Branch (3361:13): [True: 549k, False: 5.42M]
  ------------------
 3362|   549k|                auto *obj = static_cast<HeapObject *>(scratch.v.h);
 3363|   549k|                runInvariants(loc, obj);
 3364|       |                // Using std::map has the useful side-effect of ordering the fields
 3365|       |                // alphabetically.
 3366|   549k|                std::map<UString, const Identifier *> fields;
 3367|   719k|                for (const auto &f : objectFields(obj, true)) {
  ------------------
  |  Branch (3367:36): [True: 719k, False: 549k]
  ------------------
 3368|   719k|                    fields[f->name] = f;
 3369|   719k|                }
 3370|   549k|                if (fields.size() == 0) {
  ------------------
  |  Branch (3370:21): [True: 127k, False: 422k]
  ------------------
 3371|   127k|                    ss << U"{ }";
 3372|   422k|                } else {
 3373|   422k|                    UString indent2 = multiline ? indent + U"   " : indent;
  ------------------
  |  Branch (3373:39): [True: 158k, False: 263k]
  ------------------
 3374|   422k|                    const char32_t *prefix = multiline ? U"{\n" : U"{";
  ------------------
  |  Branch (3374:46): [True: 158k, False: 263k]
  ------------------
 3375|   648k|                    for (const auto &f : fields) {
  ------------------
  |  Branch (3375:40): [True: 648k, False: 422k]
  ------------------
 3376|       |                        // pushes FRAME_CALL
 3377|   648k|                        const AST *body = objectIndex(loc, obj, f.second, 0);
 3378|   648k|                        stack.top().val = scratch;
 3379|   648k|                        evaluate(body, stack.size());
 3380|   648k|                        auto vstr = manifestJson(body->location, multiline, indent2);
 3381|       |                        // Reset scratch so that the object we're manifesting doesn't
 3382|       |                        // get GC'd.
 3383|   648k|                        scratch = stack.top().val;
 3384|   648k|                        stack.pop();
 3385|   648k|                        ss << prefix << indent2 << jsonnet_string_unparse(f.first, false) << U": "
 3386|   648k|                           << vstr;
 3387|   648k|                        prefix = multiline ? U",\n" : U", ";
  ------------------
  |  Branch (3387:34): [True: 237k, False: 411k]
  ------------------
 3388|   648k|                    }
 3389|   422k|                    ss << (multiline ? U"\n" : U"") << indent << U"}";
  ------------------
  |  Branch (3389:28): [True: 44.8k, False: 377k]
  ------------------
 3390|   422k|                }
 3391|   549k|            } break;
 3392|       |
 3393|  35.4k|            case Value::STRING: {
  ------------------
  |  Branch (3393:13): [True: 35.4k, False: 5.94M]
  ------------------
 3394|  35.4k|                const UString &str = static_cast<HeapString *>(scratch.v.h)->value;
 3395|  35.4k|                ss << jsonnet_string_unparse(str, false);
 3396|  35.4k|            } break;
 3397|  5.97M|        }
 3398|  5.77M|        return ss.str();
 3399|  5.97M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13runInvariantsERKNS0_13LocationRangeEPNS1_10HeapObjectE:
 2044|   550k|    {
 2045|   550k|        if (stack.alreadyExecutingInvariants(self))
  ------------------
  |  Branch (2045:13): [True: 1.95k, False: 548k]
  ------------------
 2046|  1.95k|            return;
 2047|       |
 2048|   548k|        unsigned counter = 0;
 2049|   548k|        unsigned initial_stack_size = stack.size();
 2050|   548k|        stack.newFrame(FRAME_INVARIANTS, loc);
 2051|   548k|        std::vector<HeapThunk *> &thunks = stack.top().thunks;
 2052|   548k|        objectInvariants(self, self, counter, thunks);
 2053|   548k|        if (thunks.size() == 0) {
  ------------------
  |  Branch (2053:13): [True: 535k, False: 12.9k]
  ------------------
 2054|   535k|            stack.pop();
 2055|   535k|            return;
 2056|   535k|        }
 2057|  12.9k|        HeapThunk *thunk = thunks[0];
 2058|  12.9k|        stack.top().elementId = 1;
 2059|  12.9k|        stack.top().self = self;
 2060|  12.9k|        stack.newCall(loc, thunk, thunk->self, thunk->offset, thunk->upValues);
 2061|  12.9k|        evaluate(thunk->body, initial_stack_size);
 2062|  12.9k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111InterpreterD2Ev:
 1024|  3.57k|    {
 1025|  3.57k|        for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (1025:31): [True: 71, False: 3.57k]
  ------------------
 1026|     71|            delete pair.second;
 1027|     71|        }
 1028|  3.57k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13manifestMultiEb:
 3412|  2.18k|    {
 3413|  2.18k|        StrMap r;
 3414|  2.18k|        LocationRange loc("During manifestation");
 3415|  2.18k|        if (scratch.t != Value::OBJECT) {
  ------------------
  |  Branch (3415:13): [True: 881, False: 1.29k]
  ------------------
 3416|    881|            std::stringstream ss;
 3417|    881|            ss << "multi mode: top-level object was a " << type_str(scratch.t) << ", "
 3418|    881|               << "should be an object whose keys are filenames and values hold "
 3419|    881|               << "the JSON for that file.";
 3420|    881|            throw makeError(loc, ss.str());
 3421|    881|        }
 3422|  1.29k|        auto *obj = static_cast<HeapObject *>(scratch.v.h);
 3423|  1.29k|        runInvariants(loc, obj);
 3424|  1.29k|        std::map<UString, const Identifier *> fields;
 3425|  5.65k|        for (const auto &f : objectFields(obj, true)) {
  ------------------
  |  Branch (3425:28): [True: 5.65k, False: 1.29k]
  ------------------
 3426|  5.65k|            fields[f->name] = f;
 3427|  5.65k|        }
 3428|  5.37k|        for (const auto &f : fields) {
  ------------------
  |  Branch (3428:28): [True: 5.37k, False: 1.29k]
  ------------------
 3429|       |            // pushes FRAME_CALL
 3430|  5.37k|            const AST *body = objectIndex(loc, obj, f.second, 0);
 3431|  5.37k|            stack.top().val = scratch;
 3432|  5.37k|            evaluate(body, stack.size());
 3433|  5.37k|            auto vstr =
 3434|  5.37k|                string ? manifestString(body->location) : manifestJson(body->location, true, U"");
  ------------------
  |  Branch (3434:17): [True: 0, False: 5.37k]
  ------------------
 3435|       |            // Reset scratch so that the object we're manifesting doesn't
 3436|       |            // get GC'd.
 3437|  5.37k|            scratch = stack.top().val;
 3438|  5.37k|            stack.pop();
 3439|  5.37k|            r[encode_utf8(f.first)] = encode_utf8(vstr);
 3440|  5.37k|        }
 3441|  1.29k|        return r;
 3442|  2.18k|    }

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

_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|}

