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

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

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

_ZN7jsonnet8internal26allowed_at_end_of_operatorEc:
  174|  4.96M|bool allowed_at_end_of_operator(char c) {
  175|  4.96M|    switch (c) {
  ------------------
  |  Branch (175:13): [True: 1.90M, False: 3.06M]
  ------------------
  176|  1.47M|        case '+':
  ------------------
  |  Branch (176:9): [True: 1.47M, False: 3.49M]
  ------------------
  177|  1.64M|        case '-':
  ------------------
  |  Branch (177:9): [True: 165k, False: 4.80M]
  ------------------
  178|  1.84M|        case '~':
  ------------------
  |  Branch (178:9): [True: 202k, False: 4.76M]
  ------------------
  179|  1.86M|        case '!':
  ------------------
  |  Branch (179:9): [True: 22.2k, False: 4.94M]
  ------------------
  180|  1.90M|        case '$': return false;
  ------------------
  |  Branch (180:9): [True: 38.3k, False: 4.92M]
  ------------------
  181|  4.96M|    }
  182|  3.06M|    return true;
  183|  4.96M|}
_ZN7jsonnet8internal20lex_get_keyword_kindERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  207|  42.9M|{
  208|  42.9M|    auto it = keywords.find(identifier);
  209|  42.9M|    if (it == keywords.end())
  ------------------
  |  Branch (209:9): [True: 31.4M, False: 11.5M]
  ------------------
  210|  31.4M|        return Token::IDENTIFIER;
  211|  11.5M|    return it->second;
  212|  42.9M|}
_ZN7jsonnet8internal10lex_numberERPKcRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKNS0_8LocationE:
  215|  5.06M|{
  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.06M|    enum State {
  227|  5.06M|        BEGIN,
  228|  5.06M|        AFTER_ZERO,
  229|  5.06M|        AFTER_ONE_TO_NINE,
  230|  5.06M|        AFTER_INT_UNDERSCORE,
  231|  5.06M|        AFTER_DOT,
  232|  5.06M|        AFTER_DIGIT,
  233|  5.06M|        AFTER_FRAC_UNDERSCORE,
  234|  5.06M|        AFTER_E,
  235|  5.06M|        AFTER_EXP_SIGN,
  236|  5.06M|        AFTER_EXP_DIGIT,
  237|  5.06M|        AFTER_EXP_UNDERSCORE
  238|  5.06M|    } state;
  239|       |
  240|  5.06M|    std::string r;
  241|       |
  242|  5.06M|    state = BEGIN;
  243|  12.4M|    while (true) {
  ------------------
  |  Branch (243:12): [True: 12.4M, Folded]
  ------------------
  244|  12.4M|        switch (state) {
  ------------------
  |  Branch (244:17): [True: 12.4M, False: 0]
  ------------------
  245|  5.06M|            case BEGIN:
  ------------------
  |  Branch (245:13): [True: 5.06M, False: 7.37M]
  ------------------
  246|  5.06M|                switch (*c) {
  247|  1.05M|                    case '0': state = AFTER_ZERO; break;
  ------------------
  |  Branch (247:21): [True: 1.05M, False: 4.01M]
  ------------------
  248|       |
  249|  1.48M|                    case '1':
  ------------------
  |  Branch (249:21): [True: 1.48M, False: 3.58M]
  ------------------
  250|  1.75M|                    case '2':
  ------------------
  |  Branch (250:21): [True: 275k, False: 4.79M]
  ------------------
  251|  2.03M|                    case '3':
  ------------------
  |  Branch (251:21): [True: 277k, False: 4.79M]
  ------------------
  252|  2.89M|                    case '4':
  ------------------
  |  Branch (252:21): [True: 862k, False: 4.20M]
  ------------------
  253|  3.05M|                    case '5':
  ------------------
  |  Branch (253:21): [True: 158k, False: 4.90M]
  ------------------
  254|  3.24M|                    case '6':
  ------------------
  |  Branch (254:21): [True: 189k, False: 4.87M]
  ------------------
  255|  3.31M|                    case '7':
  ------------------
  |  Branch (255:21): [True: 66.2k, False: 5.00M]
  ------------------
  256|  3.81M|                    case '8':
  ------------------
  |  Branch (256:21): [True: 503k, False: 4.56M]
  ------------------
  257|  4.01M|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (257:21): [True: 199k, False: 4.86M]
  ------------------
  258|       |
  259|      0|                    default: throw StaticError(filename, begin, "couldn't lex number");
  ------------------
  |  Branch (259:21): [True: 0, False: 5.06M]
  ------------------
  260|  5.06M|                }
  261|  5.06M|                break;
  262|       |
  263|  5.06M|            case AFTER_ZERO:
  ------------------
  |  Branch (263:13): [True: 1.05M, False: 11.3M]
  ------------------
  264|  1.05M|                switch (*c) {
  265|  15.0k|                    case '.': state = AFTER_DOT; break;
  ------------------
  |  Branch (265:21): [True: 15.0k, False: 1.03M]
  ------------------
  266|       |
  267|  1.35k|                    case 'e':
  ------------------
  |  Branch (267:21): [True: 1.35k, False: 1.05M]
  ------------------
  268|  1.73k|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (268:21): [True: 379, False: 1.05M]
  ------------------
  269|       |
  270|      2|                    case '_': {
  ------------------
  |  Branch (270:21): [True: 2, False: 1.05M]
  ------------------
  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|  1.35k|                    }
  275|       |
  276|  1.03M|                    default: goto end;
  ------------------
  |  Branch (276:21): [True: 1.03M, False: 16.8k]
  ------------------
  277|  1.05M|                }
  278|  16.8k|                break;
  279|       |
  280|  6.10M|            case AFTER_ONE_TO_NINE:
  ------------------
  |  Branch (280:13): [True: 6.10M, False: 6.33M]
  ------------------
  281|  6.10M|                switch (*c) {
  282|  8.52k|                    case '.': state = AFTER_DOT; break;
  ------------------
  |  Branch (282:21): [True: 8.52k, False: 6.09M]
  ------------------
  283|       |
  284|  1.44k|                    case 'e':
  ------------------
  |  Branch (284:21): [True: 1.44k, False: 6.10M]
  ------------------
  285|  2.20k|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (285:21): [True: 757, False: 6.10M]
  ------------------
  286|       |
  287|   631k|                    case '0':
  ------------------
  |  Branch (287:21): [True: 631k, False: 5.47M]
  ------------------
  288|   645k|                    case '1':
  ------------------
  |  Branch (288:21): [True: 13.9k, False: 6.09M]
  ------------------
  289|   766k|                    case '2':
  ------------------
  |  Branch (289:21): [True: 121k, False: 5.98M]
  ------------------
  290|   804k|                    case '3':
  ------------------
  |  Branch (290:21): [True: 38.0k, False: 6.06M]
  ------------------
  291|   899k|                    case '4':
  ------------------
  |  Branch (291:21): [True: 95.2k, False: 6.00M]
  ------------------
  292|   991k|                    case '5':
  ------------------
  |  Branch (292:21): [True: 91.4k, False: 6.01M]
  ------------------
  293|  1.04M|                    case '6':
  ------------------
  |  Branch (293:21): [True: 52.7k, False: 6.05M]
  ------------------
  294|  1.09M|                    case '7':
  ------------------
  |  Branch (294:21): [True: 53.6k, False: 6.05M]
  ------------------
  295|  1.15M|                    case '8':
  ------------------
  |  Branch (295:21): [True: 56.4k, False: 6.04M]
  ------------------
  296|  2.08M|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (296:21): [True: 935k, False: 5.16M]
  ------------------
  297|       |
  298|    360|                    case '_': state = AFTER_INT_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (298:21): [True: 360, False: 6.10M]
  ------------------
  299|       |
  300|  4.00M|                    default: goto end;
  ------------------
  |  Branch (300:21): [True: 4.00M, False: 2.10M]
  ------------------
  301|  6.10M|                }
  302|  2.10M|                break;
  303|       |
  304|  2.10M|            case AFTER_INT_UNDERSCORE:
  ------------------
  |  Branch (304:13): [True: 360, False: 12.4M]
  ------------------
  305|    360|                switch (*c) {
  306|       |                    // The only valid transition from _ is to a digit.
  307|    122|                    case '0':
  ------------------
  |  Branch (307:21): [True: 122, False: 238]
  ------------------
  308|    125|                    case '1':
  ------------------
  |  Branch (308:21): [True: 3, False: 357]
  ------------------
  309|    143|                    case '2':
  ------------------
  |  Branch (309:21): [True: 18, False: 342]
  ------------------
  310|    143|                    case '3':
  ------------------
  |  Branch (310:21): [True: 0, False: 360]
  ------------------
  311|    143|                    case '4':
  ------------------
  |  Branch (311:21): [True: 0, False: 360]
  ------------------
  312|    352|                    case '5':
  ------------------
  |  Branch (312:21): [True: 209, False: 151]
  ------------------
  313|    352|                    case '6':
  ------------------
  |  Branch (313:21): [True: 0, False: 360]
  ------------------
  314|    352|                    case '7':
  ------------------
  |  Branch (314:21): [True: 0, False: 360]
  ------------------
  315|    352|                    case '8':
  ------------------
  |  Branch (315:21): [True: 0, False: 360]
  ------------------
  316|    352|                    case '9': state = AFTER_ONE_TO_NINE; break;
  ------------------
  |  Branch (316:21): [True: 0, False: 360]
  ------------------
  317|       |
  318|      8|                    default: {
  ------------------
  |  Branch (318:21): [True: 8, False: 352]
  ------------------
  319|      8|                        std::stringstream ss;
  320|      8|                        ss << "couldn't lex number, junk after _: " << *c;
  321|      8|                        throw StaticError(filename, begin, ss.str());
  322|    352|                    }
  323|    360|                }
  324|    352|                break;
  325|       |
  326|  23.6k|            case AFTER_DOT:
  ------------------
  |  Branch (326:13): [True: 23.6k, False: 12.4M]
  ------------------
  327|  23.6k|                switch (*c) {
  328|    524|                    case '0':
  ------------------
  |  Branch (328:21): [True: 524, False: 23.0k]
  ------------------
  329|  8.34k|                    case '1':
  ------------------
  |  Branch (329:21): [True: 7.82k, False: 15.7k]
  ------------------
  330|  8.48k|                    case '2':
  ------------------
  |  Branch (330:21): [True: 132, False: 23.4k]
  ------------------
  331|  8.57k|                    case '3':
  ------------------
  |  Branch (331:21): [True: 98, False: 23.5k]
  ------------------
  332|  8.73k|                    case '4':
  ------------------
  |  Branch (332:21): [True: 158, False: 23.4k]
  ------------------
  333|  23.2k|                    case '5':
  ------------------
  |  Branch (333:21): [True: 14.4k, False: 9.12k]
  ------------------
  334|  23.4k|                    case '6':
  ------------------
  |  Branch (334:21): [True: 245, False: 23.3k]
  ------------------
  335|  23.5k|                    case '7':
  ------------------
  |  Branch (335:21): [True: 61, False: 23.5k]
  ------------------
  336|  23.5k|                    case '8':
  ------------------
  |  Branch (336:21): [True: 48, False: 23.5k]
  ------------------
  337|  23.6k|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (337:21): [True: 28, False: 23.5k]
  ------------------
  338|       |
  339|      6|                    default: {
  ------------------
  |  Branch (339:21): [True: 6, False: 23.6k]
  ------------------
  340|      6|                        std::stringstream ss;
  341|      6|                        ss << "couldn't lex number, junk after decimal point: " << *c;
  342|      6|                        throw StaticError(filename, begin, ss.str());
  343|  23.5k|                    }
  344|  23.6k|                }
  345|  23.6k|                break;
  346|       |
  347|   174k|            case AFTER_DIGIT:
  ------------------
  |  Branch (347:13): [True: 174k, False: 12.2M]
  ------------------
  348|   174k|                switch (*c) {
  349|    107|                    case 'e':
  ------------------
  |  Branch (349:21): [True: 107, False: 174k]
  ------------------
  350|    437|                    case 'E': state = AFTER_E; break;
  ------------------
  |  Branch (350:21): [True: 330, False: 174k]
  ------------------
  351|       |
  352|  19.5k|                    case '0':
  ------------------
  |  Branch (352:21): [True: 19.5k, False: 154k]
  ------------------
  353|  43.3k|                    case '1':
  ------------------
  |  Branch (353:21): [True: 23.7k, False: 150k]
  ------------------
  354|  51.8k|                    case '2':
  ------------------
  |  Branch (354:21): [True: 8.47k, False: 166k]
  ------------------
  355|  66.8k|                    case '3':
  ------------------
  |  Branch (355:21): [True: 14.9k, False: 159k]
  ------------------
  356|  75.1k|                    case '4':
  ------------------
  |  Branch (356:21): [True: 8.32k, False: 166k]
  ------------------
  357|  98.1k|                    case '5':
  ------------------
  |  Branch (357:21): [True: 22.9k, False: 151k]
  ------------------
  358|   112k|                    case '6':
  ------------------
  |  Branch (358:21): [True: 14.6k, False: 159k]
  ------------------
  359|   120k|                    case '7':
  ------------------
  |  Branch (359:21): [True: 7.85k, False: 166k]
  ------------------
  360|   128k|                    case '8':
  ------------------
  |  Branch (360:21): [True: 7.57k, False: 166k]
  ------------------
  361|   150k|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (361:21): [True: 21.8k, False: 152k]
  ------------------
  362|       |
  363|    842|                    case '_': state = AFTER_FRAC_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (363:21): [True: 842, False: 173k]
  ------------------
  364|       |
  365|  23.1k|                    default: goto end;
  ------------------
  |  Branch (365:21): [True: 23.1k, False: 151k]
  ------------------
  366|   174k|                }
  367|   150k|                break;
  368|       |
  369|   150k|            case AFTER_FRAC_UNDERSCORE:
  ------------------
  |  Branch (369:13): [True: 842, False: 12.4M]
  ------------------
  370|    842|                switch (*c) {
  371|       |                    // The only valid transition from _ is to a digit.
  372|    345|                    case '0':
  ------------------
  |  Branch (372:21): [True: 345, False: 497]
  ------------------
  373|    345|                    case '1':
  ------------------
  |  Branch (373:21): [True: 0, False: 842]
  ------------------
  374|    471|                    case '2':
  ------------------
  |  Branch (374:21): [True: 126, False: 716]
  ------------------
  375|    471|                    case '3':
  ------------------
  |  Branch (375:21): [True: 0, False: 842]
  ------------------
  376|    572|                    case '4':
  ------------------
  |  Branch (376:21): [True: 101, False: 741]
  ------------------
  377|    830|                    case '5':
  ------------------
  |  Branch (377:21): [True: 258, False: 584]
  ------------------
  378|    830|                    case '6':
  ------------------
  |  Branch (378:21): [True: 0, False: 842]
  ------------------
  379|    831|                    case '7':
  ------------------
  |  Branch (379:21): [True: 1, False: 841]
  ------------------
  380|    831|                    case '8':
  ------------------
  |  Branch (380:21): [True: 0, False: 842]
  ------------------
  381|    831|                    case '9': state = AFTER_DIGIT; break;
  ------------------
  |  Branch (381:21): [True: 0, False: 842]
  ------------------
  382|       |
  383|     11|                    default: {
  ------------------
  |  Branch (383:21): [True: 11, False: 831]
  ------------------
  384|     11|                        std::stringstream ss;
  385|     11|                        ss << "couldn't lex number, junk after _: " << *c;
  386|     11|                        throw StaticError(filename, begin, ss.str());
  387|    831|                    }
  388|    842|                }
  389|    831|                break;
  390|       |
  391|  4.36k|            case AFTER_E:
  ------------------
  |  Branch (391:13): [True: 4.36k, False: 12.4M]
  ------------------
  392|  4.36k|                switch (*c) {
  393|    182|                    case '+':
  ------------------
  |  Branch (393:21): [True: 182, False: 4.18k]
  ------------------
  394|    698|                    case '-': state = AFTER_EXP_SIGN; break;
  ------------------
  |  Branch (394:21): [True: 516, False: 3.85k]
  ------------------
  395|       |
  396|  1.00k|                    case '0':
  ------------------
  |  Branch (396:21): [True: 1.00k, False: 3.36k]
  ------------------
  397|  1.09k|                    case '1':
  ------------------
  |  Branch (397:21): [True: 94, False: 4.27k]
  ------------------
  398|  2.22k|                    case '2':
  ------------------
  |  Branch (398:21): [True: 1.12k, False: 3.24k]
  ------------------
  399|  3.06k|                    case '3':
  ------------------
  |  Branch (399:21): [True: 834, False: 3.53k]
  ------------------
  400|  3.07k|                    case '4':
  ------------------
  |  Branch (400:21): [True: 12, False: 4.35k]
  ------------------
  401|  3.36k|                    case '5':
  ------------------
  |  Branch (401:21): [True: 294, False: 4.07k]
  ------------------
  402|  3.56k|                    case '6':
  ------------------
  |  Branch (402:21): [True: 197, False: 4.17k]
  ------------------
  403|  3.59k|                    case '7':
  ------------------
  |  Branch (403:21): [True: 28, False: 4.33k]
  ------------------
  404|  3.63k|                    case '8':
  ------------------
  |  Branch (404:21): [True: 41, False: 4.32k]
  ------------------
  405|  3.64k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (405:21): [True: 15, False: 4.35k]
  ------------------
  406|       |
  407|     22|                    default: {
  ------------------
  |  Branch (407:21): [True: 22, False: 4.34k]
  ------------------
  408|     22|                        std::stringstream ss;
  409|     22|                        ss << "couldn't lex number, junk after 'E': " << *c;
  410|     22|                        throw StaticError(filename, begin, ss.str());
  411|  3.63k|                    }
  412|  4.36k|                }
  413|  4.34k|                break;
  414|       |
  415|  4.34k|            case AFTER_EXP_SIGN:
  ------------------
  |  Branch (415:13): [True: 698, False: 12.4M]
  ------------------
  416|    698|                switch (*c) {
  417|     23|                    case '0':
  ------------------
  |  Branch (417:21): [True: 23, False: 675]
  ------------------
  418|     28|                    case '1':
  ------------------
  |  Branch (418:21): [True: 5, False: 693]
  ------------------
  419|     40|                    case '2':
  ------------------
  |  Branch (419:21): [True: 12, False: 686]
  ------------------
  420|    532|                    case '3':
  ------------------
  |  Branch (420:21): [True: 492, False: 206]
  ------------------
  421|    632|                    case '4':
  ------------------
  |  Branch (421:21): [True: 100, False: 598]
  ------------------
  422|    632|                    case '5':
  ------------------
  |  Branch (422:21): [True: 0, False: 698]
  ------------------
  423|    647|                    case '6':
  ------------------
  |  Branch (423:21): [True: 15, False: 683]
  ------------------
  424|    656|                    case '7':
  ------------------
  |  Branch (424:21): [True: 9, False: 689]
  ------------------
  425|    681|                    case '8':
  ------------------
  |  Branch (425:21): [True: 25, False: 673]
  ------------------
  426|    692|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (426:21): [True: 11, False: 687]
  ------------------
  427|       |
  428|      6|                    default: {
  ------------------
  |  Branch (428:21): [True: 6, False: 692]
  ------------------
  429|      6|                        std::stringstream ss;
  430|      6|                        ss << "couldn't lex number, junk after exponent sign: " << *c;
  431|      6|                        throw StaticError(filename, begin, ss.str());
  432|    681|                    }
  433|    698|                }
  434|    692|                break;
  435|       |
  436|  13.8k|            case AFTER_EXP_DIGIT:
  ------------------
  |  Branch (436:13): [True: 13.8k, False: 12.4M]
  ------------------
  437|  13.8k|                switch (*c) {
  438|    920|                    case '0':
  ------------------
  |  Branch (438:21): [True: 920, False: 12.9k]
  ------------------
  439|  1.25k|                    case '1':
  ------------------
  |  Branch (439:21): [True: 338, False: 13.5k]
  ------------------
  440|  2.18k|                    case '2':
  ------------------
  |  Branch (440:21): [True: 931, False: 12.9k]
  ------------------
  441|  2.90k|                    case '3':
  ------------------
  |  Branch (441:21): [True: 719, False: 13.1k]
  ------------------
  442|  4.31k|                    case '4':
  ------------------
  |  Branch (442:21): [True: 1.41k, False: 12.4k]
  ------------------
  443|  4.84k|                    case '5':
  ------------------
  |  Branch (443:21): [True: 524, False: 13.3k]
  ------------------
  444|  5.33k|                    case '6':
  ------------------
  |  Branch (444:21): [True: 487, False: 13.4k]
  ------------------
  445|  6.48k|                    case '7':
  ------------------
  |  Branch (445:21): [True: 1.15k, False: 12.7k]
  ------------------
  446|  8.27k|                    case '8':
  ------------------
  |  Branch (446:21): [True: 1.78k, False: 12.1k]
  ------------------
  447|  9.28k|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (447:21): [True: 1.01k, False: 12.8k]
  ------------------
  448|       |
  449|    269|                    case '_': state = AFTER_EXP_UNDERSCORE; goto skip_char;
  ------------------
  |  Branch (449:21): [True: 269, False: 13.6k]
  ------------------
  450|       |
  451|  4.33k|                    default: goto end;
  ------------------
  |  Branch (451:21): [True: 4.33k, False: 9.55k]
  ------------------
  452|  13.8k|                }
  453|  9.28k|                break;
  454|       |
  455|  9.28k|            case AFTER_EXP_UNDERSCORE:
  ------------------
  |  Branch (455:13): [True: 269, False: 12.4M]
  ------------------
  456|    269|                switch (*c) {
  457|       |                    // The only valid transition from _ is to a digit.
  458|    259|                    case '0':
  ------------------
  |  Branch (458:21): [True: 259, False: 10]
  ------------------
  459|    259|                    case '1':
  ------------------
  |  Branch (459:21): [True: 0, False: 269]
  ------------------
  460|    259|                    case '2':
  ------------------
  |  Branch (460:21): [True: 0, False: 269]
  ------------------
  461|    259|                    case '3':
  ------------------
  |  Branch (461:21): [True: 0, False: 269]
  ------------------
  462|    259|                    case '4':
  ------------------
  |  Branch (462:21): [True: 0, False: 269]
  ------------------
  463|    264|                    case '5':
  ------------------
  |  Branch (463:21): [True: 5, False: 264]
  ------------------
  464|    264|                    case '6':
  ------------------
  |  Branch (464:21): [True: 0, False: 269]
  ------------------
  465|    265|                    case '7':
  ------------------
  |  Branch (465:21): [True: 1, False: 268]
  ------------------
  466|    266|                    case '8':
  ------------------
  |  Branch (466:21): [True: 1, False: 268]
  ------------------
  467|    266|                    case '9': state = AFTER_EXP_DIGIT; break;
  ------------------
  |  Branch (467:21): [True: 0, False: 269]
  ------------------
  468|       |
  469|      3|                    default: {
  ------------------
  |  Branch (469:21): [True: 3, False: 266]
  ------------------
  470|      3|                        std::stringstream ss;
  471|      3|                        ss << "couldn't lex number, junk after _: " << *c;
  472|      3|                        throw StaticError(filename, begin, ss.str());
  473|    266|                    }
  474|    269|                }
  475|    266|                break;
  476|  12.4M|        }
  477|  7.37M|        r += *c;
  478|       |
  479|  7.37M|skip_char:
  480|  7.37M|        c++;
  481|  7.37M|    }
  482|  5.06M|end:
  483|  5.06M|    return r;
  484|  5.06M|}
_ZN7jsonnet8internal11jsonnet_lexERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKc:
  521|  14.2k|{
  522|  14.2k|    unsigned long line_number = 1;
  523|  14.2k|    const char *line_start = input;
  524|       |
  525|  14.2k|    Tokens r;
  526|       |
  527|  14.2k|    const char *c = input;
  528|       |
  529|  14.2k|    Fodder fodder;
  530|  14.2k|    bool fresh_line = true;  // Are we tokenizing from the beginning of a new line?
  531|       |
  532|   103M|    while (*c != '\0') {
  ------------------
  |  Branch (532:12): [True: 103M, False: 6.36k]
  ------------------
  533|       |        // Used to ensure we have actually advanced the pointer by the end of the iteration.
  534|   103M|        const char *original_c = c;
  535|       |
  536|   103M|        Token::Kind kind;
  537|   103M|        std::string data;
  538|   103M|        std::string string_block_indent;
  539|   103M|        std::string string_block_term_indent;
  540|       |
  541|   103M|        unsigned new_lines, indent;
  542|   103M|        lex_ws(c, new_lines, indent, line_start, line_number);
  543|       |
  544|       |        // If it's the end of the file, discard final whitespace.
  545|   103M|        if (*c == '\0')
  ------------------
  |  Branch (545:13): [True: 7.31k, False: 103M]
  ------------------
  546|  7.31k|            break;
  547|       |
  548|   103M|        if (new_lines > 0) {
  ------------------
  |  Branch (548:13): [True: 10.8M, False: 92.5M]
  ------------------
  549|       |            // Otherwise store whitespace in fodder.
  550|  10.8M|            unsigned blanks = new_lines - 1;
  551|  10.8M|            fodder.emplace_back(FodderElement::LINE_END, blanks, indent, EMPTY);
  552|  10.8M|            fresh_line = true;
  553|  10.8M|        }
  554|       |
  555|   103M|        Location begin(line_number, c - line_start + 1);
  556|       |
  557|   103M|        switch (*c) {
  558|       |            // The following operators should never be combined with subsequent symbols.
  559|   428k|            case '{':
  ------------------
  |  Branch (559:13): [True: 428k, False: 102M]
  ------------------
  560|   428k|                kind = Token::BRACE_L;
  561|   428k|                c++;
  562|   428k|                break;
  563|       |
  564|   422k|            case '}':
  ------------------
  |  Branch (564:13): [True: 422k, False: 102M]
  ------------------
  565|   422k|                kind = Token::BRACE_R;
  566|   422k|                c++;
  567|   422k|                break;
  568|       |
  569|  2.24M|            case '[':
  ------------------
  |  Branch (569:13): [True: 2.24M, False: 101M]
  ------------------
  570|  2.24M|                kind = Token::BRACKET_L;
  571|  2.24M|                c++;
  572|  2.24M|                break;
  573|       |
  574|  2.23M|            case ']':
  ------------------
  |  Branch (574:13): [True: 2.23M, False: 101M]
  ------------------
  575|  2.23M|                kind = Token::BRACKET_R;
  576|  2.23M|                c++;
  577|  2.23M|                break;
  578|       |
  579|  9.51M|            case ',':
  ------------------
  |  Branch (579:13): [True: 9.51M, False: 93.9M]
  ------------------
  580|  9.51M|                kind = Token::COMMA;
  581|  9.51M|                c++;
  582|  9.51M|                break;
  583|       |
  584|  5.12M|            case '.':
  ------------------
  |  Branch (584:13): [True: 5.12M, False: 98.2M]
  ------------------
  585|  5.12M|                kind = Token::DOT;
  586|  5.12M|                c++;
  587|  5.12M|                break;
  588|       |
  589|  7.72M|            case '(':
  ------------------
  |  Branch (589:13): [True: 7.72M, False: 95.6M]
  ------------------
  590|  7.72M|                kind = Token::PAREN_L;
  591|  7.72M|                c++;
  592|  7.72M|                break;
  593|       |
  594|  7.71M|            case ')':
  ------------------
  |  Branch (594:13): [True: 7.71M, False: 95.7M]
  ------------------
  595|  7.71M|                kind = Token::PAREN_R;
  596|  7.71M|                c++;
  597|  7.71M|                break;
  598|       |
  599|  2.02M|            case ';':
  ------------------
  |  Branch (599:13): [True: 2.02M, False: 101M]
  ------------------
  600|  2.02M|                kind = Token::SEMICOLON;
  601|  2.02M|                c++;
  602|  2.02M|                break;
  603|       |
  604|       |            // Numeric literals.
  605|  1.05M|            case '0':
  ------------------
  |  Branch (605:13): [True: 1.05M, False: 102M]
  ------------------
  606|  2.53M|            case '1':
  ------------------
  |  Branch (606:13): [True: 1.48M, False: 101M]
  ------------------
  607|  2.81M|            case '2':
  ------------------
  |  Branch (607:13): [True: 275k, False: 103M]
  ------------------
  608|  3.08M|            case '3':
  ------------------
  |  Branch (608:13): [True: 277k, False: 103M]
  ------------------
  609|  3.95M|            case '4':
  ------------------
  |  Branch (609:13): [True: 862k, False: 102M]
  ------------------
  610|  4.10M|            case '5':
  ------------------
  |  Branch (610:13): [True: 158k, False: 103M]
  ------------------
  611|  4.29M|            case '6':
  ------------------
  |  Branch (611:13): [True: 189k, False: 103M]
  ------------------
  612|  4.36M|            case '7':
  ------------------
  |  Branch (612:13): [True: 66.2k, False: 103M]
  ------------------
  613|  4.86M|            case '8':
  ------------------
  |  Branch (613:13): [True: 503k, False: 102M]
  ------------------
  614|  5.06M|            case '9':
  ------------------
  |  Branch (614:13): [True: 199k, False: 103M]
  ------------------
  615|  5.06M|                kind = Token::NUMBER;
  616|  5.06M|                data = lex_number(c, filename, begin);
  617|  5.06M|                break;
  618|       |
  619|       |            // UString literals.
  620|  79.8k|            case '"': {
  ------------------
  |  Branch (620:13): [True: 79.8k, False: 103M]
  ------------------
  621|  79.8k|                c++;
  622|  20.6M|                for (;; ++c) {
  623|  20.6M|                    if (*c == '\0') {
  ------------------
  |  Branch (623:25): [True: 23, False: 20.6M]
  ------------------
  624|     23|                        throw StaticError(filename, begin, "unterminated string");
  625|     23|                    }
  626|  20.6M|                    if (*c == '"') {
  ------------------
  |  Branch (626:25): [True: 79.8k, False: 20.5M]
  ------------------
  627|  79.8k|                        break;
  628|  79.8k|                    }
  629|  20.5M|                    if (*c == '\\' && *(c + 1) != '\0') {
  ------------------
  |  Branch (629:25): [True: 99.1k, False: 20.4M]
  |  Branch (629:39): [True: 99.1k, False: 2]
  ------------------
  630|  99.1k|                        data += *c;
  631|  99.1k|                        ++c;
  632|  99.1k|                    }
  633|  20.5M|                    if (*c == '\n') {
  ------------------
  |  Branch (633:25): [True: 3.31M, False: 17.2M]
  ------------------
  634|       |                        // Maintain line/column counters.
  635|  3.31M|                        line_number++;
  636|  3.31M|                        line_start = c + 1;
  637|  3.31M|                    }
  638|  20.5M|                    data += *c;
  639|  20.5M|                }
  640|  79.8k|                c++;  // Advance beyond the ".
  641|  79.8k|                kind = Token::STRING_DOUBLE;
  642|  79.8k|            } break;
  643|       |
  644|       |            // UString literals.
  645|  3.39M|            case '\'': {
  ------------------
  |  Branch (645:13): [True: 3.39M, False: 100M]
  ------------------
  646|  3.39M|                c++;
  647|  43.2M|                for (;; ++c) {
  648|  43.2M|                    if (*c == '\0') {
  ------------------
  |  Branch (648:25): [True: 19, False: 43.2M]
  ------------------
  649|     19|                        throw StaticError(filename, begin, "unterminated string");
  650|     19|                    }
  651|  43.2M|                    if (*c == '\'') {
  ------------------
  |  Branch (651:25): [True: 3.39M, False: 39.8M]
  ------------------
  652|  3.39M|                        break;
  653|  3.39M|                    }
  654|  39.8M|                    if (*c == '\\' && *(c + 1) != '\0') {
  ------------------
  |  Branch (654:25): [True: 350k, False: 39.5M]
  |  Branch (654:39): [True: 350k, False: 2]
  ------------------
  655|   350k|                        data += *c;
  656|   350k|                        ++c;
  657|   350k|                    }
  658|  39.8M|                    if (*c == '\n') {
  ------------------
  |  Branch (658:25): [True: 408k, False: 39.4M]
  ------------------
  659|       |                        // Maintain line/column counters.
  660|   408k|                        line_number++;
  661|   408k|                        line_start = c + 1;
  662|   408k|                    }
  663|  39.8M|                    data += *c;
  664|  39.8M|                }
  665|  3.39M|                c++;  // Advance beyond the '.
  666|  3.39M|                kind = Token::STRING_SINGLE;
  667|  3.39M|            } 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|  4.93k|            case '@': {
  ------------------
  |  Branch (675:13): [True: 4.93k, False: 103M]
  ------------------
  676|  4.93k|                c++;
  677|  4.93k|                if (*c != '"' && *c != '\'') {
  ------------------
  |  Branch (677:21): [True: 1.87k, False: 3.05k]
  |  Branch (677:34): [True: 22, False: 1.85k]
  ------------------
  678|     22|                    std::stringstream ss;
  679|     22|                    ss << "couldn't lex verbatim string, junk after '@': " << *c;
  680|     22|                    throw StaticError(filename, begin, ss.str());
  681|     22|                }
  682|  4.90k|                const char quot = *c;
  683|  4.90k|                c++;  // Advance beyond the opening quote.
  684|   108k|                for (;; ++c) {
  685|   108k|                    if (*c == '\0') {
  ------------------
  |  Branch (685:25): [True: 27, False: 108k]
  ------------------
  686|     27|                        throw StaticError(filename, begin, "unterminated verbatim string");
  687|     27|                    }
  688|   108k|                    if (*c == quot) {
  ------------------
  |  Branch (688:25): [True: 5.72k, False: 102k]
  ------------------
  689|  5.72k|                        if (*(c + 1) == quot) {
  ------------------
  |  Branch (689:29): [True: 844, False: 4.88k]
  ------------------
  690|    844|                            c++;
  691|  4.88k|                        } else {
  692|  4.88k|                            break;
  693|  4.88k|                        }
  694|  5.72k|                    }
  695|   103k|                    data += *c;
  696|   103k|                }
  697|  4.88k|                c++;  // Advance beyond the closing quote.
  698|  4.88k|                if (quot == '"') {
  ------------------
  |  Branch (698:21): [True: 3.04k, False: 1.83k]
  ------------------
  699|  3.04k|                    kind = Token::VERBATIM_STRING_DOUBLE;
  700|  3.04k|                } else {
  701|  1.83k|                    kind = Token::VERBATIM_STRING_SINGLE;
  702|  1.83k|                }
  703|  4.88k|            } break;
  704|       |
  705|       |            // Keywords
  706|  57.4M|            default:
  ------------------
  |  Branch (706:13): [True: 57.4M, False: 45.9M]
  ------------------
  707|  57.4M|                if (is_identifier_first(*c)) {
  ------------------
  |  Branch (707:21): [True: 42.9M, False: 14.4M]
  ------------------
  708|  42.9M|                    std::string id;
  709|   231M|                    for (; is_identifier(*c); ++c)
  ------------------
  |  Branch (709:28): [True: 188M, False: 42.9M]
  ------------------
  710|   188M|                        id += *c;
  711|  42.9M|                    kind = lex_get_keyword_kind(id);
  712|  42.9M|                    data = id;
  713|       |
  714|  42.9M|                } else if (is_symbol(*c) || *c == '#') {
  ------------------
  |  Branch (714:28): [True: 11.9M, False: 2.56M]
  |  Branch (714:45): [True: 2.56M, False: 111]
  ------------------
  715|       |                    // Single line C++ and Python style comments.
  716|  14.4M|                    if (*c == '#' || (*c == '/' && *(c + 1) == '/')) {
  ------------------
  |  Branch (716:25): [True: 2.56M, False: 11.9M]
  |  Branch (716:39): [True: 1.16M, False: 10.7M]
  |  Branch (716:52): [True: 664k, False: 499k]
  ------------------
  717|  3.22M|                        std::vector<std::string> comment(1);
  718|  3.22M|                        unsigned blanks;
  719|  3.22M|                        unsigned indent;
  720|  3.22M|                        lex_until_newline(c, comment[0], blanks, indent, line_start, line_number);
  721|  3.22M|                        auto kind = fresh_line ? FodderElement::PARAGRAPH : FodderElement::LINE_END;
  ------------------
  |  Branch (721:37): [True: 3.19M, False: 33.0k]
  ------------------
  722|  3.22M|                        fodder.emplace_back(kind, blanks, indent, comment);
  723|  3.22M|                        fresh_line = true;
  724|  3.22M|                        continue;  // We've not got a token, just fodder, so keep scanning.
  725|  3.22M|                    }
  726|       |
  727|       |                    // Multi-line C style comment.
  728|  11.2M|                    if (*c == '/' && *(c + 1) == '*') {
  ------------------
  |  Branch (728:25): [True: 499k, False: 10.7M]
  |  Branch (728:38): [True: 405k, False: 94.0k]
  ------------------
  729|   405k|                        unsigned margin = c - line_start;
  730|       |
  731|   405k|                        const char *initial_c = c;
  732|   405k|                        c += 2;  // Avoid matching /*/: skip the /* before starting the search for
  733|       |                                 // */.
  734|       |
  735|  40.8M|                        while (!(*c == '*' && *(c + 1) == '/')) {
  ------------------
  |  Branch (735:34): [True: 857k, False: 40.0M]
  |  Branch (735:47): [True: 405k, False: 451k]
  ------------------
  736|  40.4M|                            if (*c == '\0') {
  ------------------
  |  Branch (736:33): [True: 78, False: 40.4M]
  ------------------
  737|     78|                                auto msg = "multi-line comment has no terminating */.";
  738|     78|                                throw StaticError(filename, begin, msg);
  739|     78|                            }
  740|  40.4M|                            if (*c == '\n') {
  ------------------
  |  Branch (740:33): [True: 5.89M, False: 34.5M]
  ------------------
  741|       |                                // Just keep track of the line / column counters.
  742|  5.89M|                                line_number++;
  743|  5.89M|                                line_start = c + 1;
  744|  5.89M|                            }
  745|  40.4M|                            ++c;
  746|  40.4M|                        }
  747|   405k|                        c += 2;  // Move the pointer to the char after the closing '/'.
  748|       |
  749|   405k|                        std::string comment(initial_c,
  750|   405k|                                            c - initial_c);  // Includes the "/*" and "*/".
  751|       |
  752|       |                        // Lex whitespace after comment
  753|   405k|                        unsigned new_lines_after, indent_after;
  754|   405k|                        lex_ws(c, new_lines_after, indent_after, line_start, line_number);
  755|   405k|                        std::vector<std::string> lines;
  756|   405k|                        if (comment.find('\n') >= comment.length()) {
  ------------------
  |  Branch (756:29): [True: 300k, False: 105k]
  ------------------
  757|       |                            // Comment looks like /* foo */
  758|   300k|                            lines.push_back(comment);
  759|   300k|                            fodder.emplace_back(FodderElement::INTERSTITIAL, 0, 0, lines);
  760|   300k|                            if (new_lines_after > 0) {
  ------------------
  |  Branch (760:33): [True: 294k, False: 6.06k]
  ------------------
  761|   294k|                                fodder.emplace_back(FodderElement::LINE_END,
  762|   294k|                                                    new_lines_after - 1,
  763|   294k|                                                    indent_after,
  764|   294k|                                                    EMPTY);
  765|   294k|                                fresh_line = true;
  766|   294k|                            }
  767|   300k|                        } else {
  768|   105k|                            lines = line_split(comment, margin);
  769|   105k|                            assert(lines[0][0] == '/');
  ------------------
  |  Branch (769:29): [True: 105k, False: 0]
  ------------------
  770|       |                            // Little hack to support PARAGRAPHs with * down the LHS:
  771|       |                            // Add a space to lines that start with a '*'
  772|   105k|                            bool all_star = true;
  773|  6.00M|                            for (auto &l : lines) {
  ------------------
  |  Branch (773:42): [True: 6.00M, False: 105k]
  ------------------
  774|  6.00M|                                if (l[0] != '*')
  ------------------
  |  Branch (774:37): [True: 5.94M, False: 57.9k]
  ------------------
  775|  5.94M|                                    all_star = false;
  776|  6.00M|                            }
  777|   105k|                            if (all_star) {
  ------------------
  |  Branch (777:33): [True: 0, False: 105k]
  ------------------
  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|   105k|                            if (new_lines_after == 0) {
  ------------------
  |  Branch (783:33): [True: 8.26k, False: 97.1k]
  ------------------
  784|       |                                // Ensure a line end after the paragraph.
  785|  8.26k|                                new_lines_after = 1;
  786|  8.26k|                                indent_after = 0;
  787|  8.26k|                            }
  788|   105k|                            fodder_push_back(fodder,
  789|   105k|                                             FodderElement(FodderElement::PARAGRAPH,
  790|   105k|                                                           new_lines_after - 1,
  791|   105k|                                                           indent_after,
  792|   105k|                                                           lines));
  793|   105k|                            fresh_line = true;
  794|   105k|                        }
  795|   405k|                        continue;  // We've not got a token, just fodder, so keep scanning.
  796|   405k|                    }
  797|       |
  798|       |                    // Text block
  799|  10.8M|                    if (*c == '|' && *(c + 1) == '|' && *(c + 2) == '|') {
  ------------------
  |  Branch (799:25): [True: 199k, False: 10.6M]
  |  Branch (799:38): [True: 154k, False: 45.0k]
  |  Branch (799:57): [True: 4.80k, False: 150k]
  ------------------
  800|  4.80k|                        c += 3;  // Skip the "|||".
  801|       |
  802|  4.80k|                        bool chomp_trailing_nl = false;
  803|  4.80k|                        if (*c == '-') {
  ------------------
  |  Branch (803:29): [True: 418, False: 4.38k]
  ------------------
  804|    418|                            chomp_trailing_nl = true;
  805|    418|                            c++;
  806|    418|                        }
  807|       |
  808|  5.88k|                        while (is_horz_ws(*c)) ++c;  // Chomp whitespace at end of line.
  ------------------
  |  Branch (808:32): [True: 1.08k, False: 4.80k]
  ------------------
  809|  4.80k|                        if (*c != '\n') {
  ------------------
  |  Branch (809:29): [True: 37, False: 4.77k]
  ------------------
  810|     37|                            auto msg = "text block syntax requires new line after |||.";
  811|     37|                            throw StaticError(filename, begin, msg);
  812|     37|                        }
  813|  4.77k|                        std::stringstream block;
  814|  4.77k|                        c++;  // Skip the "\n"
  815|  4.77k|                        line_number++;
  816|       |                        // Skip any blank lines at the beginning of the block.
  817|  5.80k|                        while (*c == '\n') {
  ------------------
  |  Branch (817:32): [True: 1.03k, False: 4.77k]
  ------------------
  818|  1.03k|                            line_number++;
  819|  1.03k|                            ++c;
  820|  1.03k|                            block << '\n';
  821|  1.03k|                        }
  822|  4.77k|                        line_start = c;
  823|  4.77k|                        const char *first_line = c;
  824|  4.77k|                        int ws_chars = whitespace_check(first_line, c);
  825|  4.77k|                        string_block_indent = std::string(first_line, ws_chars);
  826|  4.77k|                        if (ws_chars == 0) {
  ------------------
  |  Branch (826:29): [True: 21, False: 4.74k]
  ------------------
  827|     21|                            auto msg = "text block's first line must start with whitespace.";
  828|     21|                            throw StaticError(filename, begin, msg);
  829|     21|                        }
  830|  7.01k|                        while (true) {
  ------------------
  |  Branch (830:32): [True: 7.01k, Folded]
  ------------------
  831|  7.01k|                            assert(ws_chars > 0);
  ------------------
  |  Branch (831:29): [True: 7.01k, False: 0]
  ------------------
  832|       |                            // Read up to the \n
  833|  9.78M|                            for (c = &c[ws_chars]; *c != '\n'; ++c) {
  ------------------
  |  Branch (833:52): [True: 9.77M, False: 6.94k]
  ------------------
  834|  9.77M|                                if (*c == '\0')
  ------------------
  |  Branch (834:37): [True: 71, False: 9.77M]
  ------------------
  835|     71|                                    throw StaticError(filename, begin, "unexpected EOF");
  836|  9.77M|                                block << *c;
  837|  9.77M|                            }
  838|       |                            // Add the \n
  839|  6.94k|                            block << '\n';
  840|  6.94k|                            ++c;
  841|  6.94k|                            line_number++;
  842|  6.94k|                            line_start = c;
  843|       |                            // Skip any blank lines
  844|  8.86k|                            while (*c == '\n') {
  ------------------
  |  Branch (844:36): [True: 1.92k, False: 6.94k]
  ------------------
  845|  1.92k|                                line_number++;
  846|  1.92k|                                ++c;
  847|  1.92k|                                block << '\n';
  848|  1.92k|                            }
  849|       |                            // Examine next line
  850|  6.94k|                            ws_chars = whitespace_check(first_line, c);
  851|  6.94k|                            if (ws_chars == 0) {
  ------------------
  |  Branch (851:33): [True: 4.67k, False: 2.26k]
  ------------------
  852|       |                                // End of text block (or indentation error).
  853|       |                                // Count actual whitespace on this line.
  854|  4.67k|                                int actual_ws = 0;
  855|   137k|                                while (c[actual_ws] == ' ' ||
  ------------------
  |  Branch (855:40): [True: 12.2k, False: 125k]
  ------------------
  856|   132k|                                       c[actual_ws] == '\t') {
  ------------------
  |  Branch (856:40): [True: 120k, False: 4.67k]
  ------------------
  857|   132k|                                    actual_ws++;
  858|   132k|                                }
  859|       |
  860|       |                                // Check if this is the terminator |||
  861|  4.67k|                                bool is_terminator = (
  862|  4.67k|                                    c[actual_ws] == '|' &&
  ------------------
  |  Branch (862:37): [True: 4.60k, False: 74]
  ------------------
  863|  4.60k|                                    c[actual_ws + 1] == '|' &&
  ------------------
  |  Branch (863:37): [True: 4.59k, False: 12]
  ------------------
  864|  4.59k|                                    c[actual_ws + 2] == '|');
  ------------------
  |  Branch (864:37): [True: 4.58k, False: 7]
  ------------------
  865|       |
  866|  4.67k|                                if (!is_terminator) {
  ------------------
  |  Branch (866:37): [True: 93, False: 4.58k]
  ------------------
  867|       |                                    // Not a terminator - check if it's an
  868|       |                                    // indentation issue.
  869|     93|                                    if (actual_ws > 0) {
  ------------------
  |  Branch (869:41): [True: 55, False: 38]
  ------------------
  870|       |                                        // Has whitespace but doesn't match expected
  871|       |                                        // indentation.
  872|     55|                                        std::stringstream msg;
  873|     55|                                        msg << "text block indentation mismatch: "
  874|     55|                                                "expected at least ";
  875|     55|                                        describe_whitespace(msg, string_block_indent);
  876|     55|                                        msg << ", found ";
  877|     55|                                        describe_whitespace(msg, std::string(c, actual_ws));
  878|     55|                                        throw StaticError(filename, begin, msg.str());
  879|     55|                                    } else {
  880|       |                                        // No whitespace and no ||| - missing
  881|       |                                        // terminator.
  882|     38|                                        auto msg =
  883|     38|                                            "text block not terminated with |||";
  884|     38|                                        throw StaticError(filename, begin, msg);
  885|     38|                                    }
  886|     93|                                }
  887|       |
  888|       |                                // Valid termination - skip over any whitespace.
  889|  28.3k|                                while (*c == ' ' || *c == '\t') {
  ------------------
  |  Branch (889:40): [True: 1.30k, False: 27.0k]
  |  Branch (889:53): [True: 22.4k, False: 4.58k]
  ------------------
  890|  23.7k|                                    string_block_term_indent += *c;
  891|  23.7k|                                    ++c;
  892|  23.7k|                                }
  893|       |                                // Skip the |||
  894|  4.58k|                                c += 3;  // Leave after the last |
  895|  4.58k|                                data = block.str();
  896|  4.58k|                                kind = Token::STRING_BLOCK;
  897|  4.58k|                                if (chomp_trailing_nl) {
  ------------------
  |  Branch (897:37): [True: 411, False: 4.17k]
  ------------------
  898|    411|                                    assert(data.back() == '\n');
  ------------------
  |  Branch (898:37): [True: 411, False: 0]
  ------------------
  899|    411|                                    data.pop_back();
  900|    411|                                }
  901|  4.58k|                                break;  // Out of the while loop.
  902|  4.58k|                            }
  903|  6.94k|                        }
  904|       |
  905|  4.58k|                        break;  // Out of the switch.
  906|  4.74k|                    }
  907|       |
  908|  10.8M|                    const char *operator_begin = c;
  909|  32.6M|                    for (; is_symbol(*c); ++c) {
  ------------------
  |  Branch (909:28): [True: 21.8M, False: 10.8M]
  ------------------
  910|       |                        // Not allowed // in operators
  911|  21.8M|                        if (*c == '/' && *(c + 1) == '/')
  ------------------
  |  Branch (911:29): [True: 95.4k, False: 21.7M]
  |  Branch (911:42): [True: 288, False: 95.1k]
  ------------------
  912|    288|                            break;
  913|       |                        // Not allowed /* in operators
  914|  21.8M|                        if (*c == '/' && *(c + 1) == '*')
  ------------------
  |  Branch (914:29): [True: 95.1k, False: 21.7M]
  |  Branch (914:42): [True: 639, False: 94.5k]
  ------------------
  915|    639|                            break;
  916|       |                        // Not allowed ||| in operators
  917|  21.8M|                        if (*c == '|' && *(c + 1) == '|' && *(c + 2) == '|')
  ------------------
  |  Branch (917:29): [True: 345k, False: 21.4M]
  |  Branch (917:42): [True: 150k, False: 195k]
  |  Branch (917:61): [True: 480, False: 150k]
  ------------------
  918|    480|                            break;
  919|  21.8M|                    }
  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|  12.7M|                    while (c > operator_begin + 1 && !allowed_at_end_of_operator(*(c - 1))) {
  ------------------
  |  Branch (922:28): [True: 4.96M, False: 7.78M]
  |  Branch (922:54): [True: 1.90M, False: 3.06M]
  ------------------
  923|  1.90M|                        c--;
  924|  1.90M|                    }
  925|  10.8M|                    data += std::string(operator_begin, c);
  926|  10.8M|                    if (data == "$") {
  ------------------
  |  Branch (926:25): [True: 40.5k, False: 10.8M]
  ------------------
  927|  40.5k|                        kind = Token::DOLLAR;
  928|  40.5k|                        data = "";
  929|  10.8M|                    } else {
  930|  10.8M|                        kind = Token::OPERATOR;
  931|  10.8M|                    }
  932|  10.8M|                } else {
  933|    111|                    std::stringstream ss;
  934|    111|                    ss << "Could not lex the character ";
  935|    111|                    auto uc = (unsigned char)(*c);
  936|    111|                    if (*c < 32)
  ------------------
  |  Branch (936:25): [True: 102, False: 9]
  ------------------
  937|    102|                        ss << "code " << unsigned(uc);
  938|      9|                    else
  939|      9|                        ss << "'" << *c << "'";
  940|    111|                    throw StaticError(filename, begin, ss.str());
  941|    111|                }
  942|   103M|        }
  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|  99.7M|        if (c == original_c) {
  ------------------
  |  Branch (946:13): [True: 0, False: 99.7M]
  ------------------
  947|      0|            throw StaticError(filename, begin, "internal lexing error:  pointer did not advance");
  948|      0|        }
  949|       |
  950|  99.7M|        Location end(line_number, (c + 1) - line_start);
  951|  99.7M|        r.emplace_back(kind,
  952|  99.7M|                       fodder,
  953|  99.7M|                       data,
  954|  99.7M|                       string_block_indent,
  955|  99.7M|                       string_block_term_indent,
  956|  99.7M|                       LocationRange(filename, begin, end));
  957|  99.7M|        fodder.clear();
  958|  99.7M|        fresh_line = false;
  959|  99.7M|    }
  960|       |
  961|  13.6k|    Location begin(line_number, c - line_start + 1);
  962|  13.6k|    Location end(line_number, (c + 1) - line_start + 1);
  963|  13.6k|    r.emplace_back(Token::END_OF_FILE, fodder, "", "", "", LocationRange(filename, begin, end));
  964|  13.6k|    return r;
  965|  14.2k|}
lexer.cpp:_ZN7jsonnet8internalL6lex_wsERPKcRjS4_S3_Rm:
   81|   107M|{
   82|   107M|    indent = 0;
   83|   107M|    new_lines = 0;
   84|   245M|    for (; *c != '\0' && is_ws(*c); c++) {
  ------------------
  |  Branch (84:12): [True: 245M, False: 7.81k]
  |  Branch (84:26): [True: 138M, False: 107M]
  ------------------
   85|   138M|        switch (*c) {
  ------------------
  |  Branch (85:17): [True: 138M, False: 0]
  ------------------
   86|   619k|            case '\r':
  ------------------
  |  Branch (86:13): [True: 619k, False: 137M]
  ------------------
   87|       |                // Ignore.
   88|   619k|                break;
   89|       |
   90|  15.7M|            case '\n':
  ------------------
  |  Branch (90:13): [True: 15.7M, False: 122M]
  ------------------
   91|  15.7M|                indent = 0;
   92|  15.7M|                new_lines++;
   93|  15.7M|                line_number++;
   94|  15.7M|                line_start = c + 1;
   95|  15.7M|                break;
   96|       |
   97|   121M|            case ' ': indent += 1; break;
  ------------------
  |  Branch (97:13): [True: 121M, False: 16.3M]
  ------------------
   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|  5.81k|            case '\t': indent += 8; break;
  ------------------
  |  Branch (103:13): [True: 5.81k, False: 138M]
  ------------------
  104|   138M|        }
  105|   138M|    }
  106|   107M|}
lexer.cpp:_ZN7jsonnet8internalL5is_wsEc:
   39|   245M|{
   40|   245M|    return c == '\n' || is_horz_ws(c);
  ------------------
  |  Branch (40:12): [True: 15.7M, False: 229M]
  |  Branch (40:25): [True: 122M, False: 107M]
  ------------------
   41|   245M|}
lexer.cpp:_ZN7jsonnet8internalL19is_identifier_firstEc:
  143|   288M|{
  144|   288M|    return is_upper(c) || is_lower(c) || c == '_';
  ------------------
  |  Branch (144:12): [True: 4.11M, False: 284M]
  |  Branch (144:27): [True: 220M, False: 64.0M]
  |  Branch (144:42): [True: 3.14M, False: 60.8M]
  ------------------
  145|   288M|}
lexer.cpp:_ZN7jsonnet8internalL8is_upperEc:
  128|   288M|{
  129|   288M|    return c >= 'A' && c <= 'Z';
  ------------------
  |  Branch (129:12): [True: 230M, False: 58.2M]
  |  Branch (129:24): [True: 4.11M, False: 226M]
  ------------------
  130|   288M|}
lexer.cpp:_ZN7jsonnet8internalL8is_lowerEc:
  133|   284M|{
  134|   284M|    return c >= 'a' && c <= 'z';
  ------------------
  |  Branch (134:12): [True: 220M, False: 63.7M]
  |  Branch (134:24): [True: 220M, False: 225k]
  ------------------
  135|   284M|}
lexer.cpp:_ZN7jsonnet8internalL13is_identifierEc:
  148|   231M|{
  149|   231M|    return is_identifier_first(c) || is_number(c);
  ------------------
  |  Branch (149:12): [True: 184M, False: 46.3M]
  |  Branch (149:38): [True: 3.42M, False: 42.9M]
  ------------------
  150|   231M|}
lexer.cpp:_ZN7jsonnet8internalL9is_numberEc:
  138|  46.3M|{
  139|  46.3M|    return c >= '0' && c <= '9';
  ------------------
  |  Branch (139:12): [True: 7.17M, False: 39.2M]
  |  Branch (139:24): [True: 3.42M, False: 3.75M]
  ------------------
  140|  46.3M|}
lexer.cpp:_ZN7jsonnet8internalL9is_symbolEc:
  153|  47.1M|{
  154|  47.1M|    switch (c) {
  ------------------
  |  Branch (154:13): [True: 33.7M, False: 13.4M]
  ------------------
  155|   884k|        case '!':
  ------------------
  |  Branch (155:9): [True: 884k, False: 46.2M]
  ------------------
  156|  1.00M|        case '$':
  ------------------
  |  Branch (156:9): [True: 119k, False: 47.0M]
  ------------------
  157|  6.15M|        case ':':
  ------------------
  |  Branch (157:9): [True: 5.15M, False: 42.0M]
  ------------------
  158|  6.38M|        case '~':
  ------------------
  |  Branch (158:9): [True: 226k, False: 46.9M]
  ------------------
  159|  13.3M|        case '+':
  ------------------
  |  Branch (159:9): [True: 6.99M, False: 40.1M]
  ------------------
  160|  14.3M|        case '-':
  ------------------
  |  Branch (160:9): [True: 929k, False: 46.2M]
  ------------------
  161|  15.1M|        case '&':
  ------------------
  |  Branch (161:9): [True: 888k, False: 46.2M]
  ------------------
  162|  15.7M|        case '|':
  ------------------
  |  Branch (162:9): [True: 545k, False: 46.6M]
  ------------------
  163|  15.7M|        case '^':
  ------------------
  |  Branch (163:9): [True: 1.21k, False: 47.1M]
  ------------------
  164|  27.0M|        case '=':
  ------------------
  |  Branch (164:9): [True: 11.2M, False: 35.8M]
  ------------------
  165|  27.9M|        case '<':
  ------------------
  |  Branch (165:9): [True: 902k, False: 46.2M]
  ------------------
  166|  29.0M|        case '>':
  ------------------
  |  Branch (166:9): [True: 1.15M, False: 46.0M]
  ------------------
  167|  32.0M|        case '*':
  ------------------
  |  Branch (167:9): [True: 2.99M, False: 44.1M]
  ------------------
  168|  33.3M|        case '/':
  ------------------
  |  Branch (168:9): [True: 1.25M, False: 45.9M]
  ------------------
  169|  33.7M|        case '%': return true;
  ------------------
  |  Branch (169:9): [True: 438k, False: 46.7M]
  ------------------
  170|  47.1M|    }
  171|  13.4M|    return false;
  172|  47.1M|}
lexer.cpp:_ZN7jsonnet8internalL17lex_until_newlineERPKcRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERjSC_S3_Rm:
  113|  3.22M|{
  114|  3.22M|    const char *original_c = c;
  115|  3.22M|    const char *last_non_space = c;
  116|  40.7M|    for (; *c != '\0' && *c != '\n'; c++) {
  ------------------
  |  Branch (116:12): [True: 40.7M, False: 223]
  |  Branch (116:26): [True: 37.5M, False: 3.22M]
  ------------------
  117|  37.5M|        if (!is_horz_ws(*c))
  ------------------
  |  Branch (117:13): [True: 32.2M, False: 5.30M]
  ------------------
  118|  32.2M|            last_non_space = c;
  119|  37.5M|    }
  120|  3.22M|    text = std::string(original_c, last_non_space - original_c + 1);
  121|       |    // Consume subsequent whitespace including the '\n'.
  122|  3.22M|    unsigned new_lines;
  123|  3.22M|    lex_ws(c, new_lines, indent, line_start, line_number);
  124|  3.22M|    blanks = new_lines == 0 ? 0 : new_lines - 1;
  ------------------
  |  Branch (124:14): [True: 223, False: 3.22M]
  ------------------
  125|  3.22M|}
lexer.cpp:_ZN7jsonnet8internalL10line_splitERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   60|   105k|{
   61|   105k|    std::vector<std::string> ret;
   62|   105k|    std::stringstream ss;
   63|  37.5M|    for (size_t i = 0; i < s.length(); ++i) {
  ------------------
  |  Branch (63:24): [True: 37.4M, False: 105k]
  ------------------
   64|  37.4M|        if (s[i] == '\n') {
  ------------------
  |  Branch (64:13): [True: 5.89M, False: 31.5M]
  ------------------
   65|  5.89M|            ret.emplace_back(strip_ws(ss.str(), margin));
   66|  5.89M|            ss.str("");
   67|  31.5M|        } else {
   68|  31.5M|            ss << s[i];
   69|  31.5M|        }
   70|  37.4M|    }
   71|   105k|    ret.emplace_back(strip_ws(ss.str(), margin));
   72|   105k|    return ret;
   73|   105k|}
lexer.cpp:_ZN7jsonnet8internalL8strip_wsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   45|  6.00M|{
   46|  6.00M|    if (s.size() == 0)
  ------------------
  |  Branch (46:9): [True: 5.33M, False: 661k]
  ------------------
   47|  5.33M|        return s;  // Avoid underflow below.
   48|   661k|    size_t i = 0;
   49|  2.38M|    while (i < s.length() && is_horz_ws(s[i]) && i < margin)
  ------------------
  |  Branch (49:12): [True: 2.37M, False: 677]
  |  Branch (49:30): [True: 1.97M, False: 402k]
  |  Branch (49:50): [True: 1.71M, False: 258k]
  ------------------
   50|  1.71M|        i++;
   51|   661k|    size_t j = s.size();
   52|   690k|    while (j > i && is_horz_ws(s[j - 1])) {
  ------------------
  |  Branch (52:12): [True: 688k, False: 2.16k]
  |  Branch (52:21): [True: 28.2k, False: 659k]
  ------------------
   53|  28.2k|        j--;
   54|  28.2k|    }
   55|   661k|    return std::string(&s[i], &s[j]);
   56|  6.00M|}
lexer.cpp:_ZN7jsonnet8internalL10is_horz_wsEc:
   33|   269M|{
   34|   269M|    return c == ' ' || c == '\t' || c == '\r';
  ------------------
  |  Branch (34:12): [True: 128M, False: 141M]
  |  Branch (34:24): [True: 15.1k, False: 140M]
  |  Branch (34:37): [True: 631k, False: 140M]
  ------------------
   35|   269M|}
lexer.cpp:_ZN7jsonnet8internalL16whitespace_checkEPKcS2_:
  489|  11.7k|{
  490|  11.7k|    int i = 0;
  491|   887k|    while (a[i] == ' ' || a[i] == '\t') {
  ------------------
  |  Branch (491:12): [True: 82.2k, False: 805k]
  |  Branch (491:27): [True: 798k, False: 7.03k]
  ------------------
  492|   880k|        if (b[i] != a[i])
  ------------------
  |  Branch (492:13): [True: 4.67k, False: 876k]
  ------------------
  493|  4.67k|            return 0;
  494|   876k|        i++;
  495|   876k|    }
  496|  7.03k|    return i;
  497|  11.7k|}
lexer.cpp:_ZN7jsonnet8internalL19describe_whitespaceERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_12basic_stringIcS4_S6_EE:
  499|    110|static void describe_whitespace(std::stringstream& msg, const std::string& ws) {
  500|    110|    int spaces = 0;
  501|    110|    int tabs = 0;
  502|   510k|    for (char c : ws) {
  ------------------
  |  Branch (502:17): [True: 510k, False: 110]
  ------------------
  503|   510k|        if (c == ' ')
  ------------------
  |  Branch (503:13): [True: 52.8k, False: 457k]
  ------------------
  504|  52.8k|            spaces++;
  505|   457k|        else if (c == '\t')
  ------------------
  |  Branch (505:18): [True: 457k, False: 0]
  ------------------
  506|   457k|            tabs++;
  507|   510k|    }
  508|    110|    if (spaces > 0 && tabs > 0) {
  ------------------
  |  Branch (508:9): [True: 79, False: 31]
  |  Branch (508:23): [True: 47, False: 32]
  ------------------
  509|     47|        msg << spaces << (spaces == 1 ? " space" : " spaces") << " and " << tabs
  ------------------
  |  Branch (509:27): [True: 10, False: 37]
  ------------------
  510|     47|            << (tabs == 1 ? " tab" : " tabs");
  ------------------
  |  Branch (510:17): [True: 3, False: 44]
  ------------------
  511|     63|    } else if (spaces > 0) {
  ------------------
  |  Branch (511:16): [True: 32, False: 31]
  ------------------
  512|     32|        msg << spaces << (spaces == 1 ? " space" : " spaces");
  ------------------
  |  Branch (512:27): [True: 17, False: 15]
  ------------------
  513|     32|    } else if (tabs > 0) {
  ------------------
  |  Branch (513:16): [True: 31, False: 0]
  ------------------
  514|     31|        msg << tabs << (tabs == 1 ? " tab" : " tabs");
  ------------------
  |  Branch (514:25): [True: 5, False: 26]
  ------------------
  515|     31|    } else {
  516|      0|        msg << "no indentation";
  517|      0|    }
  518|    110|}

_ZN7jsonnet8internal13FodderElementC2ENS1_4KindEjjRKNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE:
   92|  14.7M|        : kind(kind), blanks(blanks), indent(indent), comment(comment)
   93|  14.7M|    {
   94|  14.7M|        assert(kind != LINE_END || comment.size() <= 1);
  ------------------
  |  Branch (94:9): [True: 3.60M, False: 11.1M]
  |  Branch (94:9): [True: 11.1M, False: 0]
  |  Branch (94:9): [True: 14.7M, False: 0]
  ------------------
   95|  14.7M|        assert(kind != INTERSTITIAL || (blanks == 0 && indent == 0 && comment.size() == 1));
  ------------------
  |  Branch (95:9): [True: 300k, False: 0]
  |  Branch (95:9): [True: 300k, False: 0]
  |  Branch (95:9): [True: 300k, False: 0]
  |  Branch (95:9): [True: 14.4M, False: 300k]
  |  Branch (95:9): [True: 14.7M, False: 0]
  ------------------
   96|  14.7M|        assert(kind != PARAGRAPH || comment.size() >= 1);
  ------------------
  |  Branch (96:9): [True: 11.4M, False: 3.30M]
  |  Branch (96:9): [True: 3.30M, False: 0]
  |  Branch (96:9): [True: 14.7M, False: 0]
  ------------------
   97|  14.7M|    }
_ZNK7jsonnet8internal5Token6data32Ev:
  299|  34.8M|    {
  300|  34.8M|        return decode_utf8(data);
  301|  34.8M|    }
_ZN7jsonnet8internal5TokenC2ENS1_4KindERKNSt3__16vectorINS0_13FodderElementENS3_9allocatorIS5_EEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS6_IcEEEESH_SH_RKNS0_13LocationRangeE:
  308|  99.7M|        : kind(kind),
  309|  99.7M|          fodder(fodder),
  310|  99.7M|          data(data),
  311|  99.7M|          stringBlockIndent(string_block_indent),
  312|  99.7M|          stringBlockTermIndent(string_block_term_indent),
  313|  99.7M|          location(location)
  314|  99.7M|    {
  315|  99.7M|    }
_ZN7jsonnet8internal5Token8toStringENS1_4KindE:
  320|    985|    {
  321|    985|        switch (v) {
  322|     12|            case BRACE_L: return "\"{\"";
  ------------------
  |  Branch (322:13): [True: 12, False: 973]
  ------------------
  323|     22|            case BRACE_R: return "\"}\"";
  ------------------
  |  Branch (323:13): [True: 22, False: 963]
  ------------------
  324|      3|            case BRACKET_L: return "\"[\"";
  ------------------
  |  Branch (324:13): [True: 3, False: 982]
  ------------------
  325|     70|            case BRACKET_R: return "\"]\"";
  ------------------
  |  Branch (325:13): [True: 70, False: 915]
  ------------------
  326|     38|            case COMMA: return "\",\"";
  ------------------
  |  Branch (326:13): [True: 38, False: 947]
  ------------------
  327|     20|            case DOLLAR: return "\"$\"";
  ------------------
  |  Branch (327:13): [True: 20, False: 965]
  ------------------
  328|     13|            case DOT: return "\".\"";
  ------------------
  |  Branch (328:13): [True: 13, False: 972]
  ------------------
  329|       |
  330|      0|            case PAREN_L: return "\"(\"";
  ------------------
  |  Branch (330:13): [True: 0, False: 985]
  ------------------
  331|     52|            case PAREN_R: return "\")\"";
  ------------------
  |  Branch (331:13): [True: 52, False: 933]
  ------------------
  332|     24|            case SEMICOLON: return "\";\"";
  ------------------
  |  Branch (332:13): [True: 24, False: 961]
  ------------------
  333|       |
  334|    137|            case IDENTIFIER: return "IDENTIFIER";
  ------------------
  |  Branch (334:13): [True: 137, False: 848]
  ------------------
  335|     53|            case NUMBER: return "NUMBER";
  ------------------
  |  Branch (335:13): [True: 53, False: 932]
  ------------------
  336|    131|            case OPERATOR: return "OPERATOR";
  ------------------
  |  Branch (336:13): [True: 131, False: 854]
  ------------------
  337|      9|            case STRING_SINGLE: return "STRING_SINGLE";
  ------------------
  |  Branch (337:13): [True: 9, False: 976]
  ------------------
  338|     23|            case STRING_DOUBLE: return "STRING_DOUBLE";
  ------------------
  |  Branch (338:13): [True: 23, False: 962]
  ------------------
  339|      3|            case VERBATIM_STRING_SINGLE: return "VERBATIM_STRING_SINGLE";
  ------------------
  |  Branch (339:13): [True: 3, False: 982]
  ------------------
  340|      3|            case VERBATIM_STRING_DOUBLE: return "VERBATIM_STRING_DOUBLE";
  ------------------
  |  Branch (340:13): [True: 3, False: 982]
  ------------------
  341|      3|            case STRING_BLOCK: return "STRING_BLOCK";
  ------------------
  |  Branch (341:13): [True: 3, False: 982]
  ------------------
  342|       |
  343|      2|            case ASSERT: return "assert";
  ------------------
  |  Branch (343:13): [True: 2, False: 983]
  ------------------
  344|      1|            case ELSE: return "else";
  ------------------
  |  Branch (344:13): [True: 1, False: 984]
  ------------------
  345|      0|            case ERROR: return "error";
  ------------------
  |  Branch (345:13): [True: 0, False: 985]
  ------------------
  346|      0|            case FALSE: return "false";
  ------------------
  |  Branch (346:13): [True: 0, False: 985]
  ------------------
  347|      1|            case FOR: return "for";
  ------------------
  |  Branch (347:13): [True: 1, False: 984]
  ------------------
  348|      0|            case FUNCTION: return "function";
  ------------------
  |  Branch (348:13): [True: 0, False: 985]
  ------------------
  349|      4|            case IF: return "if";
  ------------------
  |  Branch (349:13): [True: 4, False: 981]
  ------------------
  350|      0|            case IMPORT: return "import";
  ------------------
  |  Branch (350:13): [True: 0, False: 985]
  ------------------
  351|      1|            case IMPORTSTR: return "importstr";
  ------------------
  |  Branch (351:13): [True: 1, False: 984]
  ------------------
  352|      1|            case IMPORTBIN: return "importbin";
  ------------------
  |  Branch (352:13): [True: 1, False: 984]
  ------------------
  353|     16|            case IN: return "in";
  ------------------
  |  Branch (353:13): [True: 16, False: 969]
  ------------------
  354|      2|            case LOCAL: return "local";
  ------------------
  |  Branch (354:13): [True: 2, False: 983]
  ------------------
  355|      1|            case NULL_LIT: return "null";
  ------------------
  |  Branch (355:13): [True: 1, False: 984]
  ------------------
  356|      0|            case SELF: return "self";
  ------------------
  |  Branch (356:13): [True: 0, False: 985]
  ------------------
  357|      1|            case SUPER: return "super";
  ------------------
  |  Branch (357:13): [True: 1, False: 984]
  ------------------
  358|      1|            case TAILSTRICT: return "tailstrict";
  ------------------
  |  Branch (358:13): [True: 1, False: 984]
  ------------------
  359|      7|            case THEN: return "then";
  ------------------
  |  Branch (359:13): [True: 7, False: 978]
  ------------------
  360|      0|            case TRUE: return "true";
  ------------------
  |  Branch (360:13): [True: 0, False: 985]
  ------------------
  361|       |
  362|    331|            case END_OF_FILE: return "end of file";
  ------------------
  |  Branch (362:13): [True: 331, False: 654]
  ------------------
  363|      0|            default:
  ------------------
  |  Branch (363:13): [True: 0, False: 985]
  ------------------
  364|      0|                std::cerr << "INTERNAL ERROR: Unknown token kind: " << v << std::endl;
  365|      0|                std::abort();
  366|    985|        }
  367|    985|    }
parser.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS0_5Token4KindE:
  387|    549|{
  388|    549|    o << Token::toString(v);
  389|    549|    return o;
  390|    549|}
parser.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_5TokenE:
  393|    462|{
  394|    462|    if (v.data == "") {
  ------------------
  |  Branch (394:9): [True: 282, False: 180]
  ------------------
  395|    282|        o << Token::toString(v.kind);
  396|    282|    } else if (v.kind == Token::OPERATOR) {
  ------------------
  |  Branch (396:16): [True: 26, False: 154]
  ------------------
  397|     26|        o << "\"" << v.data << "\"";
  398|    154|    } else {
  399|    154|        o << "(" << Token::toString(v.kind) << ", \"" << v.data << "\")";
  400|    154|    }
  401|    462|    return o;
  402|    462|}
lexer.cpp:_ZN7jsonnet8internalL16fodder_push_backERNSt3__16vectorINS0_13FodderElementENS1_9allocatorIS3_EEEERKS3_:
  143|   105k|{
  144|   105k|    if (fodder_has_clean_endline(a) && elem.kind == FodderElement::LINE_END) {
  ------------------
  |  Branch (144:9): [True: 90.5k, False: 14.7k]
  |  Branch (144:40): [True: 0, False: 90.5k]
  ------------------
  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|   105k|    } else {
  154|   105k|        if (!fodder_has_clean_endline(a) && elem.kind == FodderElement::PARAGRAPH) {
  ------------------
  |  Branch (154:13): [True: 14.7k, False: 90.5k]
  |  Branch (154:45): [True: 14.7k, False: 0]
  ------------------
  155|  14.7k|            a.emplace_back(FodderElement::LINE_END, 0, elem.indent, std::vector<std::string>());
  156|  14.7k|        }
  157|   105k|        a.push_back(elem);
  158|   105k|    }
  159|   105k|}
lexer.cpp:_ZN7jsonnet8internalL24fodder_has_clean_endlineERKNSt3__16vectorINS0_13FodderElementENS1_9allocatorIS3_EEEE:
  134|   210k|{
  135|   210k|    return !fodder.empty() && fodder.back().kind != FodderElement::INTERSTITIAL;
  ------------------
  |  Branch (135:12): [True: 189k, False: 21.0k]
  |  Branch (135:31): [True: 181k, False: 8.56k]
  ------------------
  136|   210k|}

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

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

_ZN7jsonnet8internal12CompilerPass6fodderERNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEE:
   22|  18.2M|{
   23|  18.2M|    for (auto &f : fodder)
  ------------------
  |  Branch (23:18): [True: 220k, False: 18.2M]
  ------------------
   24|   220k|        fodderElement(f);
   25|  18.2M|}
_ZN7jsonnet8internal12CompilerPass6paramsERNSt3__16vectorINS0_13FodderElementENS2_9allocatorIS4_EEEERNS3_INS0_8ArgParamENS5_IS9_EEEES8_:
   43|   406k|{
   44|   406k|    fodder(fodder_l);
   45|   666k|    for (auto &param : params) {
  ------------------
  |  Branch (45:22): [True: 666k, False: 406k]
  ------------------
   46|   666k|        fodder(param.idFodder);
   47|   666k|        if (param.expr) {
  ------------------
  |  Branch (47:13): [True: 543k, False: 123k]
  ------------------
   48|   543k|            fodder(param.eqFodder);
   49|   543k|            expr(param.expr);
   50|   543k|        }
   51|   666k|        fodder(param.commaFodder);
   52|   666k|    }
   53|   406k|    fodder(fodder_r);
   54|   406k|}
_ZN7jsonnet8internal12CompilerPass4exprERPNS0_3ASTE:
  110|  10.3M|{
  111|  10.3M|    fodder(ast_->openFodder);
  112|  10.3M|    visitExpr(ast_);
  113|  10.3M|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ApplyE:
  116|   340k|{
  117|   340k|    expr(ast->target);
  118|   340k|    params(ast->fodderL, ast->args, ast->fodderR);
  119|   340k|    if (ast->tailstrict) {
  ------------------
  |  Branch (119:9): [True: 283k, False: 56.3k]
  ------------------
  120|   283k|        fodder(ast->tailstrictFodder);
  121|   283k|    }
  122|   340k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ArrayE:
  131|   211k|{
  132|   218k|    for (auto &element : ast->elements) {
  ------------------
  |  Branch (132:24): [True: 218k, False: 211k]
  ------------------
  133|   218k|        expr(element.expr);
  134|   218k|        fodder(element.commaFodder);
  135|   218k|    }
  136|   211k|    fodder(ast->closeFodder);
  137|   211k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_6BinaryE:
  159|  1.08M|{
  160|  1.08M|    expr(ast->left);
  161|  1.08M|    fodder(ast->opFodder);
  162|  1.08M|    expr(ast->right);
  163|  1.08M|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_11ConditionalE:
  166|   636k|{
  167|   636k|    expr(ast->cond);
  168|   636k|    fodder(ast->thenFodder);
  169|   636k|    if (ast->branchFalse != nullptr) {
  ------------------
  |  Branch (169:9): [True: 636k, False: 0]
  ------------------
  170|   636k|        expr(ast->branchTrue);
  171|   636k|        fodder(ast->elseFodder);
  172|   636k|        expr(ast->branchFalse);
  173|   636k|    } else {
  174|      0|        expr(ast->branchTrue);
  175|      0|    }
  176|   636k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5ErrorE:
  179|  85.5k|{
  180|  85.5k|    expr(ast->expr);
  181|  85.5k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_8FunctionE:
  184|  65.9k|{
  185|  65.9k|    params(ast->parenLeftFodder, ast->params, ast->parenRightFodder);
  186|  65.9k|    expr(ast->body);
  187|  65.9k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_6ImportE:
  190|    581|{
  191|    581|    visit(ast->file);
  192|    581|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_9ImportstrE:
  195|    307|{
  196|    307|    visit(ast->file);
  197|    307|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_9ImportbinE:
  200|    246|{
  201|    246|    visit(ast->file);
  202|    246|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_7InSuperE:
  205|   342k|{
  206|   342k|    expr(ast->element);
  207|   342k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5IndexE:
  210|   374k|{
  211|   374k|    expr(ast->target);
  212|   374k|    if (ast->id != nullptr) {
  ------------------
  |  Branch (212:9): [True: 0, False: 374k]
  ------------------
  213|   374k|    } else {
  214|   374k|        if (ast->isSlice) {
  ------------------
  |  Branch (214:13): [True: 0, False: 374k]
  ------------------
  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|   374k|        } else {
  222|   374k|            expr(ast->index);
  223|   374k|        }
  224|   374k|    }
  225|   374k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5LocalE:
  228|   218k|{
  229|   218k|    assert(ast->binds.size() > 0);
  ------------------
  |  Branch (229:5): [True: 218k, False: 0]
  ------------------
  230|   714k|    for (auto &bind : ast->binds) {
  ------------------
  |  Branch (230:21): [True: 714k, False: 218k]
  ------------------
  231|   714k|        fodder(bind.varFodder);
  232|   714k|        if (bind.functionSugar) {
  ------------------
  |  Branch (232:13): [True: 0, False: 714k]
  ------------------
  233|      0|            params(bind.parenLeftFodder, bind.params, bind.parenRightFodder);
  234|      0|        }
  235|   714k|        fodder(bind.opFodder);
  236|   714k|        expr(bind.body);
  237|   714k|        fodder(bind.closeFodder);
  238|   714k|    }
  239|   218k|    expr(ast->body);
  240|   218k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_15DesugaredObjectE:
  249|   864k|{
  250|   864k|    for (AST *assert : ast->asserts) {
  ------------------
  |  Branch (250:22): [True: 34.6k, False: 864k]
  ------------------
  251|  34.6k|        expr(assert);
  252|  34.6k|    }
  253|   864k|    for (auto &field : ast->fields) {
  ------------------
  |  Branch (253:22): [True: 570k, False: 864k]
  ------------------
  254|   570k|        expr(field.name);
  255|   570k|        expr(field.body);
  256|   570k|    }
  257|   864k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_25ObjectComprehensionSimpleE:
  267|  46.6k|{
  268|  46.6k|    expr(ast->field);
  269|  46.6k|    expr(ast->value);
  270|  46.6k|    expr(ast->array);
  271|  46.6k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_10SuperIndexE:
  280|   361k|{
  281|   361k|    if (ast->id != nullptr) {
  ------------------
  |  Branch (281:9): [True: 0, False: 361k]
  ------------------
  282|   361k|    } else {
  283|   361k|        expr(ast->index);
  284|   361k|    }
  285|   361k|}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_5UnaryE:
  288|  1.24M|{
  289|  1.24M|    expr(ast->expr);
  290|  1.24M|}
_ZN7jsonnet8internal12CompilerPass9visitExprERPNS0_3ASTE:
  300|  10.3M|{
  301|  10.3M|    switch(ast_->type) {
  302|   340k|        VISIT(ast_, AST_APPLY, Apply);
  ------------------
  |  |  293|   340k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 340k, False: 9.98M]
  |  |  ------------------
  |  |  294|   340k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   340k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   340k|     visit(ast); \
  |  |  297|   340k|   } break
  ------------------
  |  Branch (302:9): [True: 340k, False: 0]
  ------------------
  303|      0|        VISIT(ast_, AST_APPLY_BRACE, ApplyBrace);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 10.3M]
  |  |  ------------------
  |  |  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|   211k|        VISIT(ast_, AST_ARRAY, Array);
  ------------------
  |  |  293|   211k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 211k, False: 10.1M]
  |  |  ------------------
  |  |  294|   211k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   211k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   211k|     visit(ast); \
  |  |  297|   211k|   } break
  ------------------
  |  Branch (304:9): [True: 211k, False: 0]
  ------------------
  305|      0|        VISIT(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehension);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 10.3M]
  |  |  ------------------
  |  |  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: 10.3M]
  |  |  ------------------
  |  |  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.08M|        VISIT(ast_, AST_BINARY, Binary);
  ------------------
  |  |  293|  1.08M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.08M, False: 9.23M]
  |  |  ------------------
  |  |  294|  1.08M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.08M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.08M|     visit(ast); \
  |  |  297|  1.08M|   } break
  ------------------
  |  Branch (308:9): [True: 1.08M, False: 0]
  ------------------
  309|      0|        VISIT(ast_, AST_BUILTIN_FUNCTION, BuiltinFunction);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 10.3M]
  |  |  ------------------
  |  |  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: 10.3M]
  |  |  ------------------
  |  |  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|   636k|        VISIT(ast_, AST_CONDITIONAL, Conditional);
  ------------------
  |  |  293|   636k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 636k, False: 9.68M]
  |  |  ------------------
  |  |  294|   636k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   636k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   636k|     visit(ast); \
  |  |  297|   636k|   } break
  ------------------
  |  Branch (311:9): [True: 636k, False: 0]
  ------------------
  312|   864k|        VISIT(ast_, AST_DESUGARED_OBJECT, DesugaredObject);
  ------------------
  |  |  293|   864k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 864k, False: 9.45M]
  |  |  ------------------
  |  |  294|   864k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   864k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   864k|     visit(ast); \
  |  |  297|   864k|   } break
  ------------------
  |  Branch (312:9): [True: 864k, False: 0]
  ------------------
  313|      0|        VISIT(ast_, AST_DOLLAR, Dollar);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 10.3M]
  |  |  ------------------
  |  |  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|  85.5k|        VISIT(ast_, AST_ERROR, Error);
  ------------------
  |  |  293|  85.5k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 85.5k, False: 10.2M]
  |  |  ------------------
  |  |  294|  85.5k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  85.5k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  85.5k|     visit(ast); \
  |  |  297|  85.5k|   } break
  ------------------
  |  Branch (314:9): [True: 85.5k, False: 0]
  ------------------
  315|  65.9k|        VISIT(ast_, AST_FUNCTION, Function);
  ------------------
  |  |  293|  65.9k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 65.9k, False: 10.2M]
  |  |  ------------------
  |  |  294|  65.9k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  65.9k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  65.9k|     visit(ast); \
  |  |  297|  65.9k|   } break
  ------------------
  |  Branch (315:9): [True: 65.9k, False: 0]
  ------------------
  316|    581|        VISIT(ast_, AST_IMPORT, Import);
  ------------------
  |  |  293|    581|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 581, False: 10.3M]
  |  |  ------------------
  |  |  294|    581|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|    581|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|    581|     visit(ast); \
  |  |  297|    581|   } break
  ------------------
  |  Branch (316:9): [True: 581, False: 0]
  ------------------
  317|    307|        VISIT(ast_, AST_IMPORTSTR, Importstr);
  ------------------
  |  |  293|    307|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 307, False: 10.3M]
  |  |  ------------------
  |  |  294|    307|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|    307|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|    307|     visit(ast); \
  |  |  297|    307|   } break
  ------------------
  |  Branch (317:9): [True: 307, False: 0]
  ------------------
  318|    246|        VISIT(ast_, AST_IMPORTBIN, Importbin);
  ------------------
  |  |  293|    246|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 246, False: 10.3M]
  |  |  ------------------
  |  |  294|    246|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|    246|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|    246|     visit(ast); \
  |  |  297|    246|   } break
  ------------------
  |  Branch (318:9): [True: 246, False: 0]
  ------------------
  319|   374k|        VISIT(ast_, AST_INDEX, Index);
  ------------------
  |  |  293|   374k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 374k, False: 9.94M]
  |  |  ------------------
  |  |  294|   374k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   374k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   374k|     visit(ast); \
  |  |  297|   374k|   } break
  ------------------
  |  Branch (319:9): [True: 374k, False: 0]
  ------------------
  320|   342k|        VISIT(ast_, AST_IN_SUPER, InSuper);
  ------------------
  |  |  293|   342k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 342k, False: 9.98M]
  |  |  ------------------
  |  |  294|   342k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   342k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   342k|     visit(ast); \
  |  |  297|   342k|   } break
  ------------------
  |  Branch (320:9): [True: 342k, False: 0]
  ------------------
  321|  35.2k|        VISIT(ast_, AST_LITERAL_BOOLEAN, LiteralBoolean);
  ------------------
  |  |  293|  35.2k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 35.2k, False: 10.2M]
  |  |  ------------------
  |  |  294|  35.2k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  35.2k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  35.2k|     visit(ast); \
  |  |  297|  35.2k|   } break
  ------------------
  |  Branch (321:9): [True: 35.2k, False: 0]
  ------------------
  322|  21.9k|        VISIT(ast_, AST_LITERAL_NULL, LiteralNull);
  ------------------
  |  |  293|  21.9k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 21.9k, False: 10.3M]
  |  |  ------------------
  |  |  294|  21.9k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  21.9k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  21.9k|     visit(ast); \
  |  |  297|  21.9k|   } break
  ------------------
  |  Branch (322:9): [True: 21.9k, False: 0]
  ------------------
  323|   491k|        VISIT(ast_, AST_LITERAL_NUMBER, LiteralNumber);
  ------------------
  |  |  293|   491k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 491k, False: 9.83M]
  |  |  ------------------
  |  |  294|   491k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   491k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   491k|     visit(ast); \
  |  |  297|   491k|   } break
  ------------------
  |  Branch (323:9): [True: 491k, False: 0]
  ------------------
  324|  1.77M|        VISIT(ast_, AST_LITERAL_STRING, LiteralString);
  ------------------
  |  |  293|  1.77M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.77M, False: 8.55M]
  |  |  ------------------
  |  |  294|  1.77M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.77M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.77M|     visit(ast); \
  |  |  297|  1.77M|   } break
  ------------------
  |  Branch (324:9): [True: 1.77M, False: 0]
  ------------------
  325|   218k|        VISIT(ast_, AST_LOCAL, Local);
  ------------------
  |  |  293|   218k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 218k, False: 10.1M]
  |  |  ------------------
  |  |  294|   218k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   218k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   218k|     visit(ast); \
  |  |  297|   218k|   } break
  ------------------
  |  Branch (325:9): [True: 218k, False: 0]
  ------------------
  326|      0|        VISIT(ast_, AST_OBJECT, Object);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 10.3M]
  |  |  ------------------
  |  |  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: 10.3M]
  |  |  ------------------
  |  |  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|  46.6k|        VISIT(ast_, AST_OBJECT_COMPREHENSION_SIMPLE, ObjectComprehensionSimple);
  ------------------
  |  |  293|  46.6k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 46.6k, False: 10.2M]
  |  |  ------------------
  |  |  294|  46.6k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  46.6k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  46.6k|     visit(ast); \
  |  |  297|  46.6k|   } break
  ------------------
  |  Branch (328:9): [True: 46.6k, False: 0]
  ------------------
  329|      0|        VISIT(ast_, AST_PARENS, Parens);
  ------------------
  |  |  293|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 0, False: 10.3M]
  |  |  ------------------
  |  |  294|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|      0|     visit(ast); \
  |  |  297|      0|   } break
  ------------------
  |  Branch (329:9): [True: 0, False: 0]
  ------------------
  330|  7.73k|        VISIT(ast_, AST_SELF, Self);
  ------------------
  |  |  293|  7.73k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 7.73k, False: 10.3M]
  |  |  ------------------
  |  |  294|  7.73k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  7.73k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  7.73k|     visit(ast); \
  |  |  297|  7.73k|   } break
  ------------------
  |  Branch (330:9): [True: 7.73k, False: 0]
  ------------------
  331|   361k|        VISIT(ast_, AST_SUPER_INDEX, SuperIndex);
  ------------------
  |  |  293|   361k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 361k, False: 9.96M]
  |  |  ------------------
  |  |  294|   361k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|   361k|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|   361k|     visit(ast); \
  |  |  297|   361k|   } break
  ------------------
  |  Branch (331:9): [True: 361k, False: 0]
  ------------------
  332|  1.24M|        VISIT(ast_, AST_UNARY, Unary);
  ------------------
  |  |  293|  1.24M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 1.24M, False: 9.08M]
  |  |  ------------------
  |  |  294|  1.24M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  295|  1.24M|     auto *ast = static_cast<astClass *>(var); \
  |  |  296|  1.24M|     visit(ast); \
  |  |  297|  1.24M|   } break
  ------------------
  |  Branch (332:9): [True: 1.24M, False: 0]
  ------------------
  333|  2.11M|        VISIT(ast_, AST_VAR, Var);
  ------------------
  |  |  293|  2.11M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (293:4): [True: 2.11M, False: 8.20M]
  |  |  ------------------
  |  |  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 (333:9): [True: 2.11M, False: 0]
  ------------------
  334|      0|        default:
  ------------------
  |  Branch (334:9): [True: 0, False: 10.3M]
  ------------------
  335|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  336|      0|            std::abort();
  337|      0|            break;
  338|  10.3M|    }
  339|  10.3M|}
_ZN7jsonnet8internal9ClonePass4exprERPNS0_3ASTE:
  362|  9.64M|{
  363|  9.64M|    switch(ast_->type) {
  364|   317k|        CLONE(ast_, AST_APPLY, Apply);
  ------------------
  |  |  355|   317k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 317k, False: 9.32M]
  |  |  ------------------
  |  |  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 (364:9): [True: 317k, False: 0]
  ------------------
  365|      0|        CLONE(ast_, AST_APPLY_BRACE, ApplyBrace);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 9.64M]
  |  |  ------------------
  |  |  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|   197k|        CLONE(ast_, AST_ARRAY, Array);
  ------------------
  |  |  355|   197k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 197k, False: 9.44M]
  |  |  ------------------
  |  |  356|   197k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   197k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   197k|     var = alloc.clone(ast); \
  |  |  359|   197k|   } break
  ------------------
  |  Branch (366:9): [True: 197k, False: 0]
  ------------------
  367|      0|        CLONE(ast_, AST_ARRAY_COMPREHENSION, ArrayComprehension);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 9.64M]
  |  |  ------------------
  |  |  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: 9.64M]
  |  |  ------------------
  |  |  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.01M|        CLONE(ast_, AST_BINARY, Binary);
  ------------------
  |  |  355|  1.01M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.01M, False: 8.62M]
  |  |  ------------------
  |  |  356|  1.01M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.01M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.01M|     var = alloc.clone(ast); \
  |  |  359|  1.01M|   } break
  ------------------
  |  Branch (370:9): [True: 1.01M, False: 0]
  ------------------
  371|      0|        CLONE(ast_, AST_BUILTIN_FUNCTION, BuiltinFunction);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 9.64M]
  |  |  ------------------
  |  |  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|   595k|        CLONE(ast_, AST_CONDITIONAL, Conditional);
  ------------------
  |  |  355|   595k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 595k, False: 9.04M]
  |  |  ------------------
  |  |  356|   595k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   595k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   595k|     var = alloc.clone(ast); \
  |  |  359|   595k|   } break
  ------------------
  |  Branch (372:9): [True: 595k, False: 0]
  ------------------
  373|   798k|        CLONE(ast_, AST_DESUGARED_OBJECT, DesugaredObject);
  ------------------
  |  |  355|   798k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 798k, False: 8.84M]
  |  |  ------------------
  |  |  356|   798k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   798k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   798k|     var = alloc.clone(ast); \
  |  |  359|   798k|   } break
  ------------------
  |  Branch (373:9): [True: 798k, False: 0]
  ------------------
  374|      0|        CLONE(ast_, AST_DOLLAR, Dollar);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 9.64M]
  |  |  ------------------
  |  |  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|  80.7k|        CLONE(ast_, AST_ERROR, Error);
  ------------------
  |  |  355|  80.7k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 80.7k, False: 9.56M]
  |  |  ------------------
  |  |  356|  80.7k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  80.7k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  80.7k|     var = alloc.clone(ast); \
  |  |  359|  80.7k|   } break
  ------------------
  |  Branch (375:9): [True: 80.7k, False: 0]
  ------------------
  376|  61.6k|        CLONE(ast_, AST_FUNCTION, Function);
  ------------------
  |  |  355|  61.6k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 61.6k, False: 9.58M]
  |  |  ------------------
  |  |  356|  61.6k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  61.6k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  61.6k|     var = alloc.clone(ast); \
  |  |  359|  61.6k|   } break
  ------------------
  |  Branch (376:9): [True: 61.6k, False: 0]
  ------------------
  377|    531|        CLONE(ast_, AST_IMPORT, Import);
  ------------------
  |  |  355|    531|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 531, False: 9.64M]
  |  |  ------------------
  |  |  356|    531|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|    531|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|    531|     var = alloc.clone(ast); \
  |  |  359|    531|   } break
  ------------------
  |  Branch (377:9): [True: 531, False: 0]
  ------------------
  378|    299|        CLONE(ast_, AST_IMPORTSTR, Importstr);
  ------------------
  |  |  355|    299|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 299, False: 9.64M]
  |  |  ------------------
  |  |  356|    299|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|    299|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|    299|     var = alloc.clone(ast); \
  |  |  359|    299|   } break
  ------------------
  |  Branch (378:9): [True: 299, False: 0]
  ------------------
  379|    246|        CLONE(ast_, AST_IMPORTBIN, Importbin);
  ------------------
  |  |  355|    246|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 246, False: 9.64M]
  |  |  ------------------
  |  |  356|    246|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|    246|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|    246|     var = alloc.clone(ast); \
  |  |  359|    246|   } break
  ------------------
  |  Branch (379:9): [True: 246, False: 0]
  ------------------
  380|   347k|        CLONE(ast_, AST_INDEX, Index);
  ------------------
  |  |  355|   347k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 347k, False: 9.29M]
  |  |  ------------------
  |  |  356|   347k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   347k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   347k|     var = alloc.clone(ast); \
  |  |  359|   347k|   } break
  ------------------
  |  Branch (380:9): [True: 347k, False: 0]
  ------------------
  381|   342k|        CLONE(ast_, AST_IN_SUPER, InSuper);
  ------------------
  |  |  355|   342k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 342k, False: 9.29M]
  |  |  ------------------
  |  |  356|   342k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   342k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   342k|     var = alloc.clone(ast); \
  |  |  359|   342k|   } break
  ------------------
  |  Branch (381:9): [True: 342k, False: 0]
  ------------------
  382|  35.1k|        CLONE(ast_, AST_LITERAL_BOOLEAN, LiteralBoolean);
  ------------------
  |  |  355|  35.1k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 35.1k, False: 9.60M]
  |  |  ------------------
  |  |  356|  35.1k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  35.1k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  35.1k|     var = alloc.clone(ast); \
  |  |  359|  35.1k|   } break
  ------------------
  |  Branch (382:9): [True: 35.1k, False: 0]
  ------------------
  383|  21.9k|        CLONE(ast_, AST_LITERAL_NULL, LiteralNull);
  ------------------
  |  |  355|  21.9k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 21.9k, False: 9.61M]
  |  |  ------------------
  |  |  356|  21.9k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  21.9k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  21.9k|     var = alloc.clone(ast); \
  |  |  359|  21.9k|   } break
  ------------------
  |  Branch (383:9): [True: 21.9k, False: 0]
  ------------------
  384|   456k|        CLONE(ast_, AST_LITERAL_NUMBER, LiteralNumber);
  ------------------
  |  |  355|   456k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 456k, False: 9.18M]
  |  |  ------------------
  |  |  356|   456k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   456k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   456k|     var = alloc.clone(ast); \
  |  |  359|   456k|   } break
  ------------------
  |  Branch (384:9): [True: 456k, False: 0]
  ------------------
  385|  1.69M|        CLONE(ast_, AST_LITERAL_STRING, LiteralString);
  ------------------
  |  |  355|  1.69M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.69M, False: 7.94M]
  |  |  ------------------
  |  |  356|  1.69M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.69M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.69M|     var = alloc.clone(ast); \
  |  |  359|  1.69M|   } break
  ------------------
  |  Branch (385:9): [True: 1.69M, False: 0]
  ------------------
  386|   203k|        CLONE(ast_, AST_LOCAL, Local);
  ------------------
  |  |  355|   203k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 203k, False: 9.43M]
  |  |  ------------------
  |  |  356|   203k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   203k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   203k|     var = alloc.clone(ast); \
  |  |  359|   203k|   } break
  ------------------
  |  Branch (386:9): [True: 203k, False: 0]
  ------------------
  387|      0|        CLONE(ast_, AST_OBJECT, Object);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 9.64M]
  |  |  ------------------
  |  |  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: 9.64M]
  |  |  ------------------
  |  |  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|  42.3k|        CLONE(ast_, AST_OBJECT_COMPREHENSION_SIMPLE, ObjectComprehensionSimple);
  ------------------
  |  |  355|  42.3k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 42.3k, False: 9.59M]
  |  |  ------------------
  |  |  356|  42.3k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  42.3k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  42.3k|     var = alloc.clone(ast); \
  |  |  359|  42.3k|   } break
  ------------------
  |  Branch (389:9): [True: 42.3k, False: 0]
  ------------------
  390|      0|        CLONE(ast_, AST_PARENS, Parens);
  ------------------
  |  |  355|      0|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 0, False: 9.64M]
  |  |  ------------------
  |  |  356|      0|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|      0|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|      0|     var = alloc.clone(ast); \
  |  |  359|      0|   } break
  ------------------
  |  Branch (390:9): [True: 0, False: 0]
  ------------------
  391|  7.73k|        CLONE(ast_, AST_SELF, Self);
  ------------------
  |  |  355|  7.73k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 7.73k, False: 9.63M]
  |  |  ------------------
  |  |  356|  7.73k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  7.73k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  7.73k|     var = alloc.clone(ast); \
  |  |  359|  7.73k|   } break
  ------------------
  |  Branch (391:9): [True: 7.73k, False: 0]
  ------------------
  392|   361k|        CLONE(ast_, AST_SUPER_INDEX, SuperIndex);
  ------------------
  |  |  355|   361k|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 361k, False: 9.28M]
  |  |  ------------------
  |  |  356|   361k|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|   361k|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|   361k|     var = alloc.clone(ast); \
  |  |  359|   361k|   } break
  ------------------
  |  Branch (392:9): [True: 361k, False: 0]
  ------------------
  393|  1.14M|        CLONE(ast_, AST_UNARY, Unary);
  ------------------
  |  |  355|  1.14M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.14M, False: 8.49M]
  |  |  ------------------
  |  |  356|  1.14M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.14M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.14M|     var = alloc.clone(ast); \
  |  |  359|  1.14M|   } break
  ------------------
  |  Branch (393:9): [True: 1.14M, False: 0]
  ------------------
  394|  1.91M|        CLONE(ast_, AST_VAR, Var);
  ------------------
  |  |  355|  1.91M|   case astType: { \
  |  |  ------------------
  |  |  |  Branch (355:4): [True: 1.91M, False: 7.72M]
  |  |  ------------------
  |  |  356|  1.91M|     assert(dynamic_cast<astClass *>(var)); \
  |  |  357|  1.91M|     auto *ast = static_cast<astClass *>(var); \
  |  |  358|  1.91M|     var = alloc.clone(ast); \
  |  |  359|  1.91M|   } break
  ------------------
  |  Branch (394:9): [True: 1.91M, False: 0]
  ------------------
  395|      0|        default:
  ------------------
  |  Branch (395:9): [True: 0, False: 9.64M]
  ------------------
  396|      0|            std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_ << std::endl;
  397|      0|            std::abort();
  398|      0|            break;
  399|  9.64M|    }
  400|       |
  401|  9.64M|    CompilerPass::expr(ast_);
  402|  9.64M|}
_ZN7jsonnet8internal9clone_astERNS0_9AllocatorEPNS0_3ASTE:
  405|  32.0k|{
  406|  32.0k|    AST *r = ast;
  407|  32.0k|    ClonePass(alloc).expr(r);
  408|  32.0k|    return r;
  409|  32.0k|}
_ZN7jsonnet8internal9ClonePassC2ERNS0_9AllocatorE:
  350|  32.0k|    ClonePass(Allocator &alloc) : CompilerPass(alloc) {}

_ZN7jsonnet8internal12CompilerPassC2ERNS0_9AllocatorE:
   32|  42.6k|    CompilerPass(Allocator &alloc) : alloc(alloc) {}
_ZN7jsonnet8internal12CompilerPass13fodderElementERNS0_13FodderElementE:
   34|   220k|    virtual void fodderElement(FodderElement &) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_14LiteralBooleanE:
   84|  35.2k|    virtual void visit(LiteralBoolean *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_13LiteralNumberE:
   86|   491k|    virtual void visit(LiteralNumber *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_11LiteralNullE:
   90|  21.9k|    virtual void visit(LiteralNull *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_4SelfE:
  102|  7.73k|    virtual void visit(Self *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_3VarE:
  108|  2.11M|    virtual void visit(Var *) {}
_ZN7jsonnet8internal12CompilerPass5visitEPNS0_13LiteralStringE:
   88|  1.77M|    virtual void visit(LiteralString *) {}

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

vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14HeapC2Ejd:
  346|  3.23k|        : gcTuneMinObjects(gc_tune_min_objects),
  347|  3.23k|          gcTuneGrowthTrigger(gc_tune_growth_trigger),
  348|  3.23k|          lastMark(0),
  349|  3.23k|          lastNumEntities(0),
  350|  3.23k|          numEntities(0)
  351|  3.23k|    {
  352|  3.23k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18type_strENS1_5Value4TypeE:
   76|    350|{
   77|    350|    switch (t) {
   78|      4|        case Value::NULL_TYPE: return "null";
  ------------------
  |  Branch (78:9): [True: 4, False: 346]
  ------------------
   79|     63|        case Value::BOOLEAN: return "boolean";
  ------------------
  |  Branch (79:9): [True: 63, False: 287]
  ------------------
   80|     83|        case Value::NUMBER: return "number";
  ------------------
  |  Branch (80:9): [True: 83, False: 267]
  ------------------
   81|     15|        case Value::ARRAY: return "array";
  ------------------
  |  Branch (81:9): [True: 15, False: 335]
  ------------------
   82|      2|        case Value::FUNCTION: return "function";
  ------------------
  |  Branch (82:9): [True: 2, False: 348]
  ------------------
   83|     97|        case Value::OBJECT: return "object";
  ------------------
  |  Branch (83:9): [True: 97, False: 253]
  ------------------
   84|     86|        case Value::STRING: return "string";
  ------------------
  |  Branch (84:9): [True: 86, False: 264]
  ------------------
   85|      0|        default:
  ------------------
  |  Branch (85:9): [True: 0, False: 350]
  ------------------
   86|      0|            std::cerr << "INTERNAL ERROR: Unknown type: " << t << std::endl;
   87|      0|            std::abort();
   88|      0|            return "";  // Quiet, compiler.
   89|    350|    }
   90|    350|}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_18type_strERKNS1_5ValueE:
   94|    350|{
   95|    350|    return type_str(v.t);
   96|    350|}
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Value6isHeapEv:
   69|  67.4M|    {
   70|  67.4M|        return t & 0x10;
   71|  67.4M|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_111HeapClosure9isBuiltinEv:
  293|  43.3M|    bool isBuiltin() const { return !this->body || this->body->type == AST_BUILTIN_FUNCTION_BODY; }
  ------------------
  |  Branch (293:37): [True: 0, False: 43.3M]
  |  Branch (293:52): [True: 29.5M, False: 13.7M]
  ------------------
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapThunkC2EPKNS0_10IdentifierEPNS1_10HeapObjectEjPKNS0_3ASTE:
  140|  58.7M|        : HeapEntity(THUNK), filled(false), name(name), self(self), offset(offset), body(body)
  141|  58.7M|    {
  142|  58.7M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapEntityC2ENS2_4TypeE:
   43|   124M|    HeapEntity(Type type_) : type(type_) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapEntityD2Ev:
   44|   124M|    virtual ~HeapEntity() {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap9checkHeapEv:
  489|   124M|    {
  490|   124M|        return numEntities > gcTuneMinObjects &&
  ------------------
  |  Branch (490:16): [True: 36.4M, False: 87.5M]
  ------------------
  491|  36.4M|               numEntities > gcTuneGrowthTrigger * lastNumEntities;
  ------------------
  |  Branch (491:16): [True: 147k, False: 36.2M]
  ------------------
  492|   124M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromEPNS1_10HeapEntityE:
  369|   103M|    {
  370|   103M|        assert(from != nullptr);
  ------------------
  |  Branch (370:9): [True: 103M, False: 0]
  ------------------
  371|   103M|        const GarbageCollectionMark thisMark = lastMark + 1;
  372|   103M|        struct State {
  373|   103M|            HeapEntity *ent;
  374|   103M|            std::vector<HeapEntity *> children;
  375|   103M|            State(HeapEntity *ent) : ent(ent) {}
  376|   103M|        };
  377|       |
  378|   103M|        std::vector<State> stack;
  379|   103M|        stack.emplace_back(from);
  380|       |
  381|   412M|        while (stack.size() > 0) {
  ------------------
  |  Branch (381:16): [True: 308M, False: 103M]
  ------------------
  382|   308M|            size_t curr_index = stack.size() - 1;
  383|   308M|            State &s = stack[curr_index];
  384|   308M|            HeapEntity *curr = s.ent;
  385|   308M|            if (curr->mark != thisMark) {
  ------------------
  |  Branch (385:17): [True: 78.3M, False: 230M]
  ------------------
  386|  78.3M|                curr->mark = thisMark;
  387|       |
  388|  78.3M|                switch(curr->type) {
  389|  8.81M|                    case HeapEntity::SIMPLE_OBJECT: {
  ------------------
  |  Branch (389:21): [True: 8.81M, False: 69.5M]
  ------------------
  390|  8.81M|                        assert(dynamic_cast<HeapSimpleObject *>(curr));
  ------------------
  |  Branch (390:25): [True: 8.81M, False: 0]
  ------------------
  391|  8.81M|                        auto *obj = static_cast<HeapSimpleObject *>(curr);
  392|  8.81M|                        for (auto upv : obj->upValues)
  ------------------
  |  Branch (392:39): [True: 6.87M, False: 8.81M]
  ------------------
  393|  6.87M|                            addIfHeapEntity(upv.second, s.children);
  394|  8.81M|                        break;
  395|  8.81M|                    }
  396|  6.17M|                    case HeapEntity::EXTENDED_OBJECT: {
  ------------------
  |  Branch (396:21): [True: 6.17M, False: 72.1M]
  ------------------
  397|  6.17M|                        assert(dynamic_cast<HeapExtendedObject *>(curr));
  ------------------
  |  Branch (397:25): [True: 6.17M, False: 0]
  ------------------
  398|  6.17M|                        auto *obj = static_cast<HeapExtendedObject *>(curr);
  399|  6.17M|                        addIfHeapEntity(obj->left, s.children);
  400|  6.17M|                        addIfHeapEntity(obj->right, s.children);
  401|  6.17M|                        break;
  402|  6.17M|                    }
  403|      0|                    case HeapEntity::RESTRICTED_OBJECT: {
  ------------------
  |  Branch (403:21): [True: 0, False: 78.3M]
  ------------------
  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.3M]
  ------------------
  410|      0|                        assert(dynamic_cast<HeapComprehensionObject *>(curr));
  ------------------
  |  Branch (410:25): [True: 0, False: 0]
  ------------------
  411|      0|                        auto *obj = static_cast<HeapComprehensionObject *>(curr);
  412|      0|                        for (auto upv : obj->upValues)
  ------------------
  |  Branch (412:39): [True: 0, False: 0]
  ------------------
  413|      0|                            addIfHeapEntity(upv.second, s.children);
  414|      0|                        for (auto upv : obj->compValues)
  ------------------
  |  Branch (414:39): [True: 0, False: 0]
  ------------------
  415|      0|                            addIfHeapEntity(upv.second, s.children);
  416|      0|                        break;
  417|      0|                    }
  418|  1.02M|                    case HeapEntity::ARRAY: {
  ------------------
  |  Branch (418:21): [True: 1.02M, False: 77.3M]
  ------------------
  419|  1.02M|                        assert(dynamic_cast<HeapArray *>(curr));
  ------------------
  |  Branch (419:25): [True: 1.02M, False: 0]
  ------------------
  420|  1.02M|                        auto *arr = static_cast<HeapArray *>(curr);
  421|  1.02M|                        for (auto el : arr->elements)
  ------------------
  |  Branch (421:38): [True: 13.7M, False: 1.02M]
  ------------------
  422|  13.7M|                            addIfHeapEntity(el, s.children);
  423|  1.02M|                        break;
  424|  1.02M|                    }
  425|  2.54M|                    case HeapEntity::CLOSURE: {
  ------------------
  |  Branch (425:21): [True: 2.54M, False: 75.7M]
  ------------------
  426|  2.54M|                        assert(dynamic_cast<HeapClosure *>(curr));
  ------------------
  |  Branch (426:25): [True: 2.54M, False: 0]
  ------------------
  427|  2.54M|                        auto *func = static_cast<HeapClosure *>(curr);
  428|  2.54M|                        for (auto upv : func->upValues)
  ------------------
  |  Branch (428:39): [True: 6.46M, False: 2.54M]
  ------------------
  429|  6.46M|                            addIfHeapEntity(upv.second, s.children);
  430|  2.54M|                        if (func->self)
  ------------------
  |  Branch (430:29): [True: 2.29M, False: 249k]
  ------------------
  431|  2.29M|                            addIfHeapEntity(func->self, s.children);
  432|  2.54M|                        break;
  433|  2.54M|                    }
  434|  55.8M|                    case HeapEntity::THUNK: {
  ------------------
  |  Branch (434:21): [True: 55.8M, False: 22.4M]
  ------------------
  435|  55.8M|                        assert(dynamic_cast<HeapThunk *>(curr));
  ------------------
  |  Branch (435:25): [True: 55.8M, False: 0]
  ------------------
  436|  55.8M|                        auto *thunk = static_cast<HeapThunk *>(curr);
  437|  55.8M|                        if (thunk->filled) {
  ------------------
  |  Branch (437:29): [True: 14.8M, False: 41.0M]
  ------------------
  438|  14.8M|                            if (thunk->content.isHeap())
  ------------------
  |  Branch (438:33): [True: 10.5M, False: 4.25M]
  ------------------
  439|  10.5M|                                addIfHeapEntity(thunk->content.v.h, s.children);
  440|  41.0M|                        } else {
  441|  41.0M|                            for (auto upv : thunk->upValues)
  ------------------
  |  Branch (441:43): [True: 10.4M, False: 41.0M]
  ------------------
  442|  10.4M|                                addIfHeapEntity(upv.second, s.children);
  443|  41.0M|                            if (thunk->self)
  ------------------
  |  Branch (443:33): [True: 39.7M, False: 1.27M]
  ------------------
  444|  39.7M|                                addIfHeapEntity(thunk->self, s.children);
  445|  41.0M|                        }
  446|  55.8M|                        break;
  447|  55.8M|                    }
  448|  3.89M|                    case HeapEntity::STRING:
  ------------------
  |  Branch (448:21): [True: 3.89M, False: 74.4M]
  ------------------
  449|  3.89M|                        assert(dynamic_cast<HeapString *>(curr));
  ------------------
  |  Branch (449:25): [True: 3.89M, False: 0]
  ------------------
  450|  3.89M|                        break;
  451|  3.89M|                    default:
  ------------------
  |  Branch (451:21): [True: 0, False: 78.3M]
  ------------------
  452|      0|                        assert(false);
  ------------------
  |  Branch (452:25): [Folded, False: 0]
  ------------------
  453|      0|                        break;
  454|  78.3M|                }
  455|  78.3M|            }
  456|       |
  457|   308M|            if (s.children.size() > 0) {
  ------------------
  |  Branch (457:17): [True: 102M, False: 206M]
  ------------------
  458|   102M|                HeapEntity *next = s.children[s.children.size() - 1];
  459|   102M|                s.children.pop_back();
  460|   102M|                stack.emplace_back(next);  // CAUTION: s invalidated here
  461|   206M|            } else {
  462|   206M|                stack.pop_back();  // CAUTION: s invalidated here
  463|   206M|            }
  464|   308M|        }
  465|   103M|    }
vm.cpp:_ZZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromEPNS1_10HeapEntityEEN5StateC2ES4_:
  375|   206M|            State(HeapEntity *ent) : ent(ent) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap15addIfHeapEntityEPNS1_10HeapEntityERNSt3__16vectorIS4_NS5_9allocatorIS4_EEEE:
  340|   102M|    {
  341|   102M|        vec.push_back(v);
  342|   102M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap8markFromENS1_5ValueE:
  362|  52.2M|    {
  363|  52.2M|        if (v.isHeap())
  ------------------
  |  Branch (363:13): [True: 12.4M, False: 39.8M]
  ------------------
  364|  12.4M|            markFrom(v.v.h);
  365|  52.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap5sweepEv:
  469|   150k|    {
  470|   150k|        lastMark++;
  471|       |        // Heap shrinks during this loop.  Do not cache entities.size().
  472|   202M|        for (unsigned long i = 0; i < entities.size(); ++i) {
  ------------------
  |  Branch (472:35): [True: 202M, False: 150k]
  ------------------
  473|   202M|            HeapEntity *x = entities[i];
  474|   202M|            if (x->mark != lastMark) {
  ------------------
  |  Branch (474:17): [True: 124M, False: 78.3M]
  ------------------
  475|   124M|                delete x;
  476|   124M|                if (i != entities.size() - 1) {
  ------------------
  |  Branch (476:21): [True: 123M, False: 123k]
  ------------------
  477|       |                    // Swap it with the back.
  478|   123M|                    entities[i] = entities[entities.size() - 1];
  479|   123M|                }
  480|   124M|                entities.pop_back();
  481|   124M|                --i;
  482|   124M|            }
  483|   202M|        }
  484|   150k|        lastNumEntities = numEntities = entities.size();
  485|   150k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapThunk4fillERKNS1_5ValueE:
  145|  35.3M|    {
  146|  35.3M|        content = v;
  147|  35.3M|        filled = true;
  148|  35.3M|        self = nullptr;
  149|  35.3M|        upValues.clear();
  150|  35.3M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapArrayEJRKNSt3__16vectorIPNS1_9HeapThunkENS5_9allocatorIS8_EEEEEEEPT_DpOT0_:
  501|   855k|    {
  502|   855k|        T *r = new T(std::forward<Args>(args)...);
  503|   855k|        entities.push_back(r);
  504|   855k|        r->mark = lastMark;
  505|   855k|        numEntities = entities.size();
  506|   855k|        return r;
  507|   855k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_19HeapArrayC2ERKNSt3__16vectorIPNS1_9HeapThunkENS3_9allocatorIS6_EEEE:
  159|   855k|        : HeapEntity(ARRAY), elements(elements)
  160|   855k|    {
  161|   855k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_10HeapStringEJRKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEEEEPT_DpOT0_:
  501|  47.2M|    {
  502|  47.2M|        T *r = new T(std::forward<Args>(args)...);
  503|  47.2M|        entities.push_back(r);
  504|  47.2M|        r->mark = lastMark;
  505|  47.2M|        numEntities = entities.size();
  506|  47.2M|        return r;
  507|  47.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapStringC2ERKNSt3__112basic_stringIDiNS3_11char_traitsIDiEENS3_9allocatorIDiEEEE:
  299|  47.2M|    HeapString(const UString &value) : HeapEntity(STRING), value(value) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierEDniDnEEEPT_DpOT0_:
  501|   532k|    {
  502|   532k|        T *r = new T(std::forward<Args>(args)...);
  503|   532k|        entities.push_back(r);
  504|   532k|        r->mark = lastMark;
  505|   532k|        numEntities = entities.size();
  506|   532k|        return r;
  507|   532k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_114HeapLeafObjectC2ENS1_10HeapEntity4TypeE:
  166|  1.73M|    HeapLeafObject(Type type) : HeapObject(type) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_110HeapObjectC2ENS1_10HeapEntity4TypeE:
  109|  3.00M|    HeapObject(Type type) : HeapEntity(type) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111HeapClosure5ParamC2EPKNS0_10IdentifierEPKNS0_3ASTE:
  275|  23.2M|        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|  11.4M|    {
  502|  11.4M|        T *r = new T(std::forward<Args>(args)...);
  503|  11.4M|        entities.push_back(r);
  504|  11.4M|        r->mark = lastMark;
  505|  11.4M|        numEntities = entities.size();
  506|  11.4M|        return r;
  507|  11.4M|    }
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|  14.1M|        : HeapEntity(CLOSURE),
  284|  14.1M|          upValues(up_values),
  285|  14.1M|          self(self),
  286|  14.1M|          offset(offset),
  287|  14.1M|          params(params),
  288|  14.1M|          body(body),
  289|  14.1M|          builtinName(builtin_name)
  290|  14.1M|    {
  291|  14.1M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJDnDniPKNS0_3ASTEEEEPT_DpOT0_:
  501|  3.23k|    {
  502|  3.23k|        T *r = new T(std::forward<Args>(args)...);
  503|  3.23k|        entities.push_back(r);
  504|  3.23k|        r->mark = lastMark;
  505|  3.23k|        numEntities = entities.size();
  506|  3.23k|        return r;
  507|  3.23k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJPNS0_10IdentifierERPNS1_10HeapObjectEiRKPNS0_3ASTEEEEPT_DpOT0_:
  501|   520k|    {
  502|   520k|        T *r = new T(std::forward<Args>(args)...);
  503|   520k|        entities.push_back(r);
  504|   520k|        r->mark = lastMark;
  505|   520k|        numEntities = entities.size();
  506|   520k|        return r;
  507|   520k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14HeapD2Ev:
  355|  3.23k|    {
  356|       |        // Nothing is marked, everything will be collected.
  357|  3.23k|        sweep();
  358|  3.23k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  501|  32.8M|    {
  502|  32.8M|        T *r = new T(std::forward<Args>(args)...);
  503|  32.8M|        entities.push_back(r);
  504|  32.8M|        r->mark = lastMark;
  505|  32.8M|        numEntities = entities.size();
  506|  32.8M|        return r;
  507|  32.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_11HeapClosureEJRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EEEEEERPNS1_10HeapObjectERjRKNS5_6vectorINS4_5ParamENSE_ISR_EEEERPNS0_3ASTERA1_KcEEEPT_DpOT0_:
  501|  2.66M|    {
  502|  2.66M|        T *r = new T(std::forward<Args>(args)...);
  503|  2.66M|        entities.push_back(r);
  504|  2.66M|        r->mark = lastMark;
  505|  2.66M|        numEntities = entities.size();
  506|  2.66M|        return r;
  507|  2.66M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRKPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  501|  24.7M|    {
  502|  24.7M|        T *r = new T(std::forward<Args>(args)...);
  503|  24.7M|        entities.push_back(r);
  504|  24.7M|        r->mark = lastMark;
  505|  24.7M|        numEntities = entities.size();
  506|  24.7M|        return r;
  507|  24.7M|    }
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.73M|    {
  502|  1.73M|        T *r = new T(std::forward<Args>(args)...);
  503|  1.73M|        entities.push_back(r);
  504|  1.73M|        r->mark = lastMark;
  505|  1.73M|        numEntities = entities.size();
  506|  1.73M|        return r;
  507|  1.73M|    }
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.73M|        : HeapLeafObject(SIMPLE_OBJECT), upValues(up_values), fields(fields), asserts(asserts)
  197|  1.73M|    {
  198|  1.73M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPKNS0_3ASTEEEEPT_DpOT0_:
  501|    240|    {
  502|    240|        T *r = new T(std::forward<Args>(args)...);
  503|    240|        entities.push_back(r);
  504|    240|        r->mark = lastMark;
  505|    240|        numEntities = entities.size();
  506|    240|        return r;
  507|    240|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_18HeapExtendedObjectEJRPNS1_10HeapObjectES7_EEEPT_DpOT0_:
  501|  1.26M|    {
  502|  1.26M|        T *r = new T(std::forward<Args>(args)...);
  503|  1.26M|        entities.push_back(r);
  504|  1.26M|        r->mark = lastMark;
  505|  1.26M|        numEntities = entities.size();
  506|  1.26M|        return r;
  507|  1.26M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_118HeapExtendedObjectC2EPNS1_10HeapObjectES4_:
  210|  1.26M|        : HeapObject(EXTENDED_OBJECT), left(left), right(right)
  211|  1.26M|    {
  212|  1.26M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_14Heap10makeEntityINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRPNS0_3ASTEEEEPT_DpOT0_:
  501|   129k|    {
  502|   129k|        T *r = new T(std::forward<Args>(args)...);
  503|   129k|        entities.push_back(r);
  504|   129k|        r->mark = lastMark;
  505|   129k|        numEntities = entities.size();
  506|   129k|        return r;
  507|   129k|    }

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

libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_11StaticErrorE:
  108|  3.87k|{
  109|  3.87k|    o << err.toString();
  110|  3.87k|    return o;
  111|  3.87k|}
_ZNK7jsonnet8internal11StaticError8toStringEv:
   97|  3.87k|    {
   98|  3.87k|        std::stringstream ss;
   99|  3.87k|        if (location.isSet()) {
  ------------------
  |  Branch (99:13): [True: 3.86k, False: 10]
  ------------------
  100|  3.86k|            ss << location << ":";
  101|  3.86k|        }
  102|  3.87k|        ss << " " << msg;
  103|  3.87k|        return ss.str();
  104|  3.87k|    }
_ZNK7jsonnet8internal13LocationRange5isSetEv:
   58|   358k|    {
   59|   358k|        return begin.isSet();
   60|   358k|    }
_ZNK7jsonnet8internal8Location5isSetEv:
   31|   358k|    {
   32|   358k|        return line != 0;
   33|   358k|    }
libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_13LocationRangeE:
   64|  23.0k|{
   65|  23.0k|    if (loc.file.length() > 0)
  ------------------
  |  Branch (65:9): [True: 11.4k, False: 11.6k]
  ------------------
   66|  11.4k|        o << loc.file;
   67|  23.0k|    if (loc.isSet()) {
  ------------------
  |  Branch (67:9): [True: 22.0k, False: 1.02k]
  ------------------
   68|  22.0k|        if (loc.file.length() > 0)
  ------------------
  |  Branch (68:13): [True: 10.4k, False: 11.6k]
  ------------------
   69|  10.4k|            o << ":";
   70|  22.0k|        if (loc.begin.line == loc.end.line) {
  ------------------
  |  Branch (70:13): [True: 19.9k, False: 2.07k]
  ------------------
   71|  19.9k|            if (loc.begin.column == loc.end.column - 1) {
  ------------------
  |  Branch (71:17): [True: 5.74k, False: 14.2k]
  ------------------
   72|  5.74k|                o << loc.begin;
   73|  14.2k|            } else {
   74|  14.2k|                o << loc.begin << "-" << loc.end.column;
   75|  14.2k|            }
   76|  19.9k|        } else {
   77|  2.07k|            o << "(" << loc.begin << ")-(" << loc.end << ")";
   78|  2.07k|        }
   79|  22.0k|    }
   80|  23.0k|    return o;
   81|  23.0k|}
libjsonnet.cpp:_ZN7jsonnet8internallsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS0_8LocationE:
   41|  24.1k|{
   42|  24.1k|    o << loc.line << ":" << loc.column;
   43|  24.1k|    return o;
   44|  24.1k|}
_ZN7jsonnet8internal8LocationC2Ev:
   28|  4.25M|    Location(void) : line(0), column(0) {}
_ZN7jsonnet8internal8LocationC2Emm:
   29|   203M|    Location(unsigned long line, unsigned long column) : line(line), column(column) {}
_ZNK7jsonnet8internal8Location9successorEv:
   35|    560|    {
   36|    560|        return Location(this->line, this->column + 1);
   37|    560|    }
_ZN7jsonnet8internal13LocationRangeC2Ev:
   50|  2.12M|    LocationRange(void) {}
_ZN7jsonnet8internal13LocationRangeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   52|  6.12k|    LocationRange(const std::string &msg) : file(msg) {}
_ZN7jsonnet8internal13LocationRangeC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS0_8LocationESD_:
   54|   156M|        : file(file), begin(begin), end(end)
   55|   156M|    {
   56|   156M|    }
_ZN7jsonnet8internal11StaticErrorC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS0_8LocationESA_:
   88|    560|        : location(filename, location, location.successor()), msg(msg)
   89|    560|    {
   90|    560|    }
_ZN7jsonnet8internal11StaticErrorC2ERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   92|  3.31k|        : location(location), msg(msg)
   93|  3.31k|    {
   94|  3.31k|    }

_ZN7jsonnet8internal22jsonnet_string_unparseERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEEb:
   25|   261k|{
   26|   261k|    UStringStream ss;
   27|   261k|    ss << (single ? U'\'' : U'\"');
  ------------------
  |  Branch (27:12): [True: 0, False: 261k]
  ------------------
   28|   261k|    ss << jsonnet_string_escape(str, single);
   29|   261k|    ss << (single ? U'\'' : U'\"');
  ------------------
  |  Branch (29:12): [True: 0, False: 261k]
  ------------------
   30|   261k|    return ss.str();
   31|   261k|}
_ZN7jsonnet8internal21jsonnet_string_escapeERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEEb:
   34|   261k|{
   35|   261k|    UStringStream ss;
   36|   655M|    for (std::size_t i = 0; i < str.length(); ++i) {
  ------------------
  |  Branch (36:29): [True: 655M, False: 261k]
  ------------------
   37|   655M|        char32_t c = str[i];
   38|   655M|        switch (c) {
   39|   578k|            case U'\"': ss << (single ? U"\"" : U"\\\""); break;
  ------------------
  |  Branch (39:13): [True: 578k, False: 654M]
  |  Branch (39:32): [True: 0, False: 578k]
  ------------------
   40|  11.7k|            case U'\'': ss << (single ? U"\\\'" : U"\'"); break;
  ------------------
  |  Branch (40:13): [True: 11.7k, False: 655M]
  |  Branch (40:32): [True: 0, False: 11.7k]
  ------------------
   41|   604M|            case U'\\': ss << U"\\\\"; break;
  ------------------
  |  Branch (41:13): [True: 604M, False: 50.8M]
  ------------------
   42|  43.0k|            case U'\b': ss << U"\\b"; break;
  ------------------
  |  Branch (42:13): [True: 43.0k, False: 654M]
  ------------------
   43|  19.5k|            case U'\f': ss << U"\\f"; break;
  ------------------
  |  Branch (43:13): [True: 19.5k, False: 655M]
  ------------------
   44|  1.34M|            case U'\n': ss << U"\\n"; break;
  ------------------
  |  Branch (44:13): [True: 1.34M, False: 653M]
  ------------------
   45|   146k|            case U'\r': ss << U"\\r"; break;
  ------------------
  |  Branch (45:13): [True: 146k, False: 654M]
  ------------------
   46|   423k|            case U'\t': ss << U"\\t"; break;
  ------------------
  |  Branch (46:13): [True: 423k, False: 654M]
  ------------------
   47|  96.6k|            case U'\0': ss << U"\\u0000"; break;
  ------------------
  |  Branch (47:13): [True: 96.6k, False: 654M]
  ------------------
   48|  48.1M|            default: {
  ------------------
  |  Branch (48:13): [True: 48.1M, False: 606M]
  ------------------
   49|  48.1M|                if (c < 0x20 || (c >= 0x7f && c <= 0x9f)) {
  ------------------
  |  Branch (49:21): [True: 11.7M, False: 36.3M]
  |  Branch (49:34): [True: 2.82M, False: 33.5M]
  |  Branch (49:47): [True: 302k, False: 2.52M]
  ------------------
   50|       |                    // Unprintable, use \u
   51|  12.0M|                    std::stringstream ss8;
   52|  12.0M|                    ss8 << "\\u" << std::hex << std::setfill('0') << std::setw(4)
   53|  12.0M|                        << (unsigned long)(c);
   54|  12.0M|                    ss << decode_utf8(ss8.str());
   55|  36.0M|                } else {
   56|       |                    // Printable, write verbatim
   57|  36.0M|                    ss << c;
   58|  36.0M|                }
   59|  48.1M|            }
   60|   655M|        }
   61|   655M|    }
   62|   261k|    return ss.str();
   63|   261k|}
_ZN7jsonnet8internal28jsonnet_string_parse_unicodeERKNS0_13LocationRangeEPKDi:
   66|  28.3k|{
   67|  28.3k|    unsigned long codepoint = 0;
   68|       |    // Expect 4 hex digits.
   69|   141k|    for (unsigned i = 0; i < 4; ++i) {
  ------------------
  |  Branch (69:26): [True: 113k, False: 28.3k]
  ------------------
   70|   113k|        auto x = (unsigned char)(c[i]);
   71|   113k|        unsigned digit;
   72|   113k|        if (x == '\0') {
  ------------------
  |  Branch (72:13): [True: 17, False: 113k]
  ------------------
   73|     17|            auto msg = "Truncated unicode escape sequence in string literal.";
   74|     17|            throw StaticError(loc, msg);
   75|   113k|        } else if (x >= '0' && x <= '9') {
  ------------------
  |  Branch (75:20): [True: 113k, False: 13]
  |  Branch (75:32): [True: 72.6k, False: 40.7k]
  ------------------
   76|  72.6k|            digit = x - '0';
   77|  72.6k|        } else if (x >= 'a' && x <= 'f') {
  ------------------
  |  Branch (77:20): [True: 28.7k, False: 12.0k]
  |  Branch (77:32): [True: 28.7k, False: 14]
  ------------------
   78|  28.7k|            digit = x - 'a' + 10;
   79|  28.7k|        } else if (x >= 'A' && x <= 'F') {
  ------------------
  |  Branch (79:20): [True: 12.0k, False: 23]
  |  Branch (79:32): [True: 11.9k, False: 25]
  ------------------
   80|  11.9k|            digit = x - 'A' + 10;
   81|  11.9k|        } else {
   82|     48|            std::stringstream ss;
   83|     48|            ss << "Malformed unicode escape character, "
   84|     48|               << "should be hex: '" << x << "'";
   85|     48|            throw StaticError(loc, ss.str());
   86|     48|        }
   87|   113k|        codepoint *= 16;
   88|   113k|        codepoint += digit;
   89|   113k|    }
   90|  28.3k|    return codepoint;
   91|  28.3k|}
_ZN7jsonnet8internal16is_bmp_codepointEm:
   94|  28.0k|{
   95|  28.0k|    return codepoint < 0xd800 || (codepoint >= 0xe000 && codepoint < 0x10000);
  ------------------
  |  Branch (95:12): [True: 23.9k, False: 4.12k]
  |  Branch (95:35): [True: 3.79k, False: 322]
  |  Branch (95:58): [True: 3.79k, False: 0]
  ------------------
   96|  28.0k|}
_ZN7jsonnet8internal23decode_utf16_surrogatesERKNS0_13LocationRangeEmm:
   99|    301|{
  100|    301|    if (high >= 0xd800 && high < 0xdc00 && low >= 0xdc00 && low < 0xe000) {
  ------------------
  |  Branch (100:9): [True: 301, False: 0]
  |  Branch (100:27): [True: 294, False: 7]
  |  Branch (100:44): [True: 290, False: 4]
  |  Branch (100:61): [True: 289, False: 1]
  ------------------
  101|    289|        return 0x10000 + ((high & 0x03ff) << 10) + (low & 0x03ff);
  102|    289|    } else {
  103|     12|        std::stringstream ss;
  104|     12|        ss << "Invalid UTF-16 bytes";
  105|     12|        throw StaticError(loc, ss.str());
  106|     12|    }
  107|    301|}
_ZN7jsonnet8internal23jsonnet_string_unescapeERKNS0_13LocationRangeERKNSt3__112basic_stringIDiNS4_11char_traitsIDiEENS4_9allocatorIDiEEEE:
  110|  3.45M|{
  111|  3.45M|    UString r;
  112|  3.45M|    const char32_t *s_ptr = s.c_str();
  113|  59.1M|    for (const char32_t *c = s_ptr; *c != U'\0'; ++c) {
  ------------------
  |  Branch (113:37): [True: 55.7M, False: 3.45M]
  ------------------
  114|  55.7M|        switch (*c) {
  115|   433k|            case '\\':
  ------------------
  |  Branch (115:13): [True: 433k, False: 55.2M]
  ------------------
  116|   433k|                switch (*(++c)) {
  117|  17.2k|                    case '"':
  ------------------
  |  Branch (117:21): [True: 17.2k, False: 416k]
  ------------------
  118|  18.0k|                    case '\'': r += *c; break;
  ------------------
  |  Branch (118:21): [True: 838, False: 432k]
  ------------------
  119|       |
  120|   110k|                    case '\\': r += *c; break;
  ------------------
  |  Branch (120:21): [True: 110k, False: 323k]
  ------------------
  121|       |
  122|  1.71k|                    case '/': r += *c; break;
  ------------------
  |  Branch (122:21): [True: 1.71k, False: 432k]
  ------------------
  123|       |
  124|  16.2k|                    case 'b': r += '\b'; break;
  ------------------
  |  Branch (124:21): [True: 16.2k, False: 417k]
  ------------------
  125|       |
  126|  21.2k|                    case 'f': r += '\f'; break;
  ------------------
  |  Branch (126:21): [True: 21.2k, False: 412k]
  ------------------
  127|       |
  128|   206k|                    case 'n': r += '\n'; break;
  ------------------
  |  Branch (128:21): [True: 206k, False: 227k]
  ------------------
  129|       |
  130|  14.8k|                    case 'r': r += '\r'; break;
  ------------------
  |  Branch (130:21): [True: 14.8k, False: 418k]
  ------------------
  131|       |
  132|  16.7k|                    case 't': r += '\t'; break;
  ------------------
  |  Branch (132:21): [True: 16.7k, False: 416k]
  ------------------
  133|       |
  134|  28.0k|                    case 'u': {
  ------------------
  |  Branch (134:21): [True: 28.0k, False: 405k]
  ------------------
  135|  28.0k|                        ++c;  // Consume the 'u'.
  136|  28.0k|                        unsigned long codepoint = jsonnet_string_parse_unicode(loc, c);
  137|       |
  138|       |                        // Leave us on the last char, ready for the ++c at
  139|       |                        // the outer for loop.
  140|  28.0k|                        c += 3;
  141|  28.0k|                        if (!is_bmp_codepoint(codepoint)) {
  ------------------
  |  Branch (141:29): [True: 322, False: 27.7k]
  ------------------
  142|    322|                           if (*(++c) != '\\') {
  ------------------
  |  Branch (142:32): [True: 11, False: 311]
  ------------------
  143|     11|                                std::stringstream ss;
  144|     11|                                ss << "Invalid non-BMP Unicode escape in string literal";
  145|     11|                                throw StaticError(loc, ss.str());
  146|     11|                           }
  147|    311|                           if (*(++c) != 'u') {
  ------------------
  |  Branch (147:32): [True: 7, False: 304]
  ------------------
  148|      7|                                std::stringstream ss;
  149|      7|                                ss << "Invalid non-BMP Unicode escape in string literal";
  150|      7|                                throw StaticError(loc, ss.str());
  151|      7|                           }
  152|    304|                           ++c;
  153|    304|                           unsigned long codepoint2 = jsonnet_string_parse_unicode(loc, c);
  154|    304|                           c += 3;
  155|    304|                           codepoint = decode_utf16_surrogates(loc, codepoint, codepoint2);
  156|    304|                       }
  157|  28.0k|                       r += codepoint;
  158|  28.0k|                    } break;
  159|       |
  160|      3|                    case '\0': {
  ------------------
  |  Branch (160:21): [True: 3, False: 433k]
  ------------------
  161|      3|                        auto msg = "Truncated escape sequence in string literal.";
  162|      3|                        throw StaticError(loc, msg);
  163|  28.0k|                    }
  164|       |
  165|    139|                    default: {
  ------------------
  |  Branch (165:21): [True: 139, False: 433k]
  ------------------
  166|    139|                        std::stringstream ss;
  167|    139|                        std::string utf8;
  168|    139|                        encode_utf8(*c, utf8);
  169|    139|                        ss << "Unknown escape sequence in string literal: '" << utf8 << "'";
  170|    139|                        throw StaticError(loc, ss.str());
  171|  28.0k|                    }
  172|   433k|                }
  173|   433k|                break;
  174|       |
  175|  55.2M|            default:
  ------------------
  |  Branch (175:13): [True: 55.2M, False: 433k]
  ------------------
  176|       |                // Just a regular letter.
  177|  55.2M|                r += *c;
  178|  55.7M|        }
  179|  55.7M|    }
  180|  3.45M|    return r;
  181|  3.45M|}

_ZN7jsonnet8internal13UStringStreamlsERKNSt3__112basic_stringIDiNS2_11char_traitsIDiEENS2_9allocatorIDiEEEE:
  155|  21.9M|    {
  156|  21.9M|        buf.append(s);
  157|  21.9M|        return *this;
  158|  21.9M|    }
_ZN7jsonnet8internal13UStringStreamlsEPKDi:
  160|   611M|    {
  161|   611M|        buf.append(s);
  162|   611M|        return *this;
  163|   611M|    }
_ZN7jsonnet8internal13UStringStreamlsEDi:
  165|  36.6M|    {
  166|  36.6M|        buf.push_back(c);
  167|  36.6M|        return *this;
  168|  36.6M|    }
_ZN7jsonnet8internal13UStringStream3strEv:
  179|  4.86M|    {
  180|  4.86M|        return buf;
  181|  4.86M|    }
parser.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  34.8M|{
  141|  34.8M|    UString r;
  142|   239M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 204M, False: 34.8M]
  ------------------
  143|   204M|        r.push_back(decode_utf8(s, i));
  144|  34.8M|    return r;
  145|  34.8M|}
parser.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|   204M|{
   76|   204M|    char c0 = str[i];
   77|   204M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 203M, False: 1.30M]
  ------------------
   78|   203M|        return c0;
   79|   203M|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 146k, False: 1.15M]
  ------------------
   80|   146k|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 3.53k, False: 142k]
  ------------------
   81|  3.53k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  3.53k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|  3.53k|        }
   83|   142k|        char c1 = str[++i];
   84|   142k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 134k, False: 8.34k]
  ------------------
   85|   134k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   134k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|   134k|        }
   87|  8.34k|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|  1.15M|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 203k, False: 949k]
  ------------------
   89|   203k|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 2.22k, False: 201k]
  ------------------
   90|  2.22k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  2.22k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|  2.22k|        }
   92|   201k|        char c1 = str[++i];
   93|   201k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 190k, False: 11.0k]
  ------------------
   94|   190k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   190k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|   190k|        }
   96|  11.0k|        char c2 = str[++i];
   97|  11.0k|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 7.68k, False: 3.38k]
  ------------------
   98|  7.68k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  7.68k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|  7.68k|        }
  100|  3.38k|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|   949k|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 106k, False: 843k]
  ------------------
  102|   106k|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 546, False: 105k]
  ------------------
  103|    546|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|    546|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|    546|        }
  105|   105k|        char c1 = str[++i];
  106|   105k|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 39.5k, False: 65.9k]
  ------------------
  107|  39.5k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  39.5k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|  39.5k|        }
  109|  65.9k|        char c2 = str[++i];
  110|  65.9k|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 2.50k, False: 63.4k]
  ------------------
  111|  2.50k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  2.50k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|  2.50k|        }
  113|  63.4k|        char c3 = str[++i];
  114|  63.4k|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 1.78k, False: 61.6k]
  ------------------
  115|  1.78k|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|  1.78k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|  1.78k|        }
  117|  61.6k|        return ((c0 & 0x7) << 18ul) | ((c1 & 0x3F) << 12ul) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
  118|   843k|    } else {
  119|   843k|        return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|   843k|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  120|   843k|    }
  121|   204M|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|    619|{
  134|    619|    std::string r;
  135|    619|    encode_utf8(s, r);
  136|    619|    return r;
  137|    619|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|    619|{
  128|    619|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 3.81M, False: 619]
  ------------------
  129|  3.81M|        encode_utf8(cp, r);
  130|    619|}
static_analysis.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  3.81M|{
   34|  3.81M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  3.81M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 0, False: 3.81M]
  ------------------
   35|      0|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  3.81M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  3.81M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 3.81M, False: 0]
  ------------------
   41|  3.81M|        s.push_back((char)x);
   42|  3.81M|        return 1;
   43|  3.81M|    } 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|  3.81M|}
string_utils.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  12.0M|{
  141|  12.0M|    UString r;
  142|  84.5M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 72.5M, False: 12.0M]
  ------------------
  143|  72.5M|        r.push_back(decode_utf8(s, i));
  144|  12.0M|    return r;
  145|  12.0M|}
string_utils.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  72.5M|{
   76|  72.5M|    char c0 = str[i];
   77|  72.5M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 72.5M, False: 0]
  ------------------
   78|  72.5M|        return c0;
   79|  72.5M|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 0, False: 0]
  ------------------
   80|      0|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|      0|        }
   83|      0|        char c1 = str[++i];
   84|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|      0|        }
   87|      0|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|      0|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 0, False: 0]
  ------------------
   89|      0|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 0, False: 0]
  ------------------
   90|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|      0|        }
   92|      0|        char c1 = str[++i];
   93|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 0, False: 0]
  ------------------
   94|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|      0|        }
   96|      0|        char c2 = str[++i];
   97|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|      0|        }
  100|      0|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|      0|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 0, False: 0]
  ------------------
  102|      0|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  ------------------
  103|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|      0|        }
  105|      0|        char c1 = str[++i];
  106|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 0, False: 0]
  ------------------
  107|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|      0|        }
  109|      0|        char c2 = str[++i];
  110|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 0, False: 0]
  ------------------
  111|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|      0|        }
  113|      0|        char c3 = str[++i];
  114|      0|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|      0|        }
  117|      0|        return ((c0 & 0x7) << 18ul) | ((c1 & 0x3F) << 12ul) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
  118|      0|    } else {
  119|      0|        return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  120|      0|    }
  121|  72.5M|}
string_utils.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|    139|{
   34|    139|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|    139|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 3, False: 136]
  ------------------
   35|      3|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      3|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|    139|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|    139|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 68, False: 71]
  ------------------
   41|     68|        s.push_back((char)x);
   42|     68|        return 1;
   43|     71|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 11, False: 60]
  ------------------
   44|     11|        bytes |= 0xC080;
   45|     11|        s.push_back((bytes >> 8) & 0xFF);
   46|     11|        s.push_back((bytes >> 0) & 0xFF);
   47|     11|        return 2;
   48|     60|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 50, False: 10]
  ------------------
   49|     50|        bytes |= 0xE08080;
   50|     50|        s.push_back((bytes >> 16) & 0xFF);
   51|     50|        s.push_back((bytes >> 8) & 0xFF);
   52|     50|        s.push_back((bytes >> 0) & 0xFF);
   53|     50|        return 3;
   54|     50|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 10, False: 0]
  ------------------
   55|     10|        bytes |= 0xF0808080;
   56|     10|        s.push_back((bytes >> 24) & 0xFF);
   57|     10|        s.push_back((bytes >> 16) & 0xFF);
   58|     10|        s.push_back((bytes >> 8) & 0xFF);
   59|     10|        s.push_back((bytes >> 0) & 0xFF);
   60|     10|        return 4;
   61|     10|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|    139|}
vm.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  2.91M|{
  141|  2.91M|    UString r;
  142|  7.07M|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 4.16M, False: 2.91M]
  ------------------
  143|  4.16M|        r.push_back(decode_utf8(s, i));
  144|  2.91M|    return r;
  145|  2.91M|}
vm.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  4.16M|{
   76|  4.16M|    char c0 = str[i];
   77|  4.16M|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 4.16M, False: 0]
  ------------------
   78|  4.16M|        return c0;
   79|  4.16M|    } 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|  4.16M|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|   666k|{
  134|   666k|    std::string r;
  135|   666k|    encode_utf8(s, r);
  136|   666k|    return r;
  137|   666k|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|   666k|{
  128|   666k|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 586M, False: 666k]
  ------------------
  129|   586M|        encode_utf8(cp, r);
  130|   666k|}
vm.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|   586M|{
   34|   586M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|   586M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 986, False: 586M]
  ------------------
   35|    986|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|    986|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|   586M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|   586M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 586M, False: 160k]
  ------------------
   41|   586M|        s.push_back((char)x);
   42|   586M|        return 1;
   43|   586M|    } else if (x < 0x800) {  // note that capital 'Y' bits must be 0
  ------------------
  |  Branch (43:16): [True: 1.91k, False: 158k]
  ------------------
   44|  1.91k|        bytes |= 0xC080;
   45|  1.91k|        s.push_back((bytes >> 8) & 0xFF);
   46|  1.91k|        s.push_back((bytes >> 0) & 0xFF);
   47|  1.91k|        return 2;
   48|   158k|    } else if (x < 0x10000) {  // note that 'z' bits must be 0
  ------------------
  |  Branch (48:16): [True: 148k, False: 9.87k]
  ------------------
   49|   148k|        bytes |= 0xE08080;
   50|   148k|        s.push_back((bytes >> 16) & 0xFF);
   51|   148k|        s.push_back((bytes >> 8) & 0xFF);
   52|   148k|        s.push_back((bytes >> 0) & 0xFF);
   53|   148k|        return 3;
   54|   148k|    } else if (x < 0x110000) {  // note that capital 'Z' bits must be 0
  ------------------
  |  Branch (54:16): [True: 9.87k, False: 0]
  ------------------
   55|  9.87k|        bytes |= 0xF0808080;
   56|  9.87k|        s.push_back((bytes >> 24) & 0xFF);
   57|  9.87k|        s.push_back((bytes >> 16) & 0xFF);
   58|  9.87k|        s.push_back((bytes >> 8) & 0xFF);
   59|  9.87k|        s.push_back((bytes >> 0) & 0xFF);
   60|  9.87k|        return 4;
   61|  9.87k|    } else {
   62|      0|        std::cerr << "Should never get here." << std::endl;
   63|      0|        abort();
   64|      0|    }
   65|   586M|}
_ZN7jsonnet8internal13UStringStreamlsIiEERS1_T_:
  171|   988k|    {
  172|   988k|        std::stringstream ss;
  173|   988k|        ss << c;
  174|   988k|        for (char c : ss.str())
  ------------------
  |  Branch (174:21): [True: 2.07M, False: 988k]
  ------------------
  175|  2.07M|            buf.push_back(char32_t(c));
  176|   988k|        return *this;
  177|   988k|    }
_ZN7jsonnet8internal13UStringStreamlsIjEERS1_T_:
  171|   112k|    {
  172|   112k|        std::stringstream ss;
  173|   112k|        ss << c;
  174|   112k|        for (char c : ss.str())
  ------------------
  |  Branch (174:21): [True: 370k, False: 112k]
  ------------------
  175|   370k|            buf.push_back(char32_t(c));
  176|   112k|        return *this;
  177|   112k|    }
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEE:
  133|   299k|{
  134|   299k|    std::string r;
  135|   299k|    encode_utf8(s, r);
  136|   299k|    return r;
  137|   299k|}
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8ERKNSt3__112basic_stringIDiNS1_11char_traitsIDiEENS1_9allocatorIDiEEEERNS2_IcNS3_IcEENS5_IcEEEE:
  127|   299k|{
  128|   299k|    for (char32_t cp : s)
  ------------------
  |  Branch (128:22): [True: 2.00M, False: 299k]
  ------------------
  129|  2.00M|        encode_utf8(cp, r);
  130|   299k|}
desugarer.cpp:_ZN7jsonnet8internalL11encode_utf8EDiRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   33|  2.00M|{
   34|  2.00M|    if (x >= JSONNET_CODEPOINT_MAX)
  ------------------
  |  |   22|  2.00M|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (34:9): [True: 0, False: 2.00M]
  ------------------
   35|      0|        x = JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   36|       |
   37|       |    // 00ZZZzzz 00zzYYYY 00Yyyyxx 00xxxxxx
   38|  2.00M|    long bytes = ((x & 0x1C0000) << 6) | ((x & 0x03F000) << 4) | ((x & 0x0FC0) << 2) | (x & 0x3F);
   39|       |
   40|  2.00M|    if (x < 0x80) {
  ------------------
  |  Branch (40:9): [True: 2.00M, False: 0]
  ------------------
   41|  2.00M|        s.push_back((char)x);
   42|  2.00M|        return 1;
   43|  2.00M|    } 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.00M|}
desugarer.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  140|  7.13k|{
  141|  7.13k|    UString r;
  142|  45.9k|    for (size_t i = 0; i < s.length(); ++i)
  ------------------
  |  Branch (142:24): [True: 38.7k, False: 7.13k]
  ------------------
  143|  38.7k|        r.push_back(decode_utf8(s, i));
  144|  7.13k|    return r;
  145|  7.13k|}
desugarer.cpp:_ZN7jsonnet8internalL11decode_utf8ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   75|  38.7k|{
   76|  38.7k|    char c0 = str[i];
   77|  38.7k|    if ((c0 & 0x80) == 0) {  // 0xxxxxxx
  ------------------
  |  Branch (77:9): [True: 38.7k, False: 0]
  ------------------
   78|  38.7k|        return c0;
   79|  38.7k|    } else if ((c0 & 0xE0) == 0xC0) {  // 110yyyxx 10xxxxxx
  ------------------
  |  Branch (79:16): [True: 0, False: 0]
  ------------------
   80|      0|        if (i + 1 >= str.length()) {
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   82|      0|        }
   83|      0|        char c1 = str[++i];
   84|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   86|      0|        }
   87|      0|        return ((c0 & 0x1F) << 6ul) | (c1 & 0x3F);
   88|      0|    } else if ((c0 & 0xF0) == 0xE0) {  // 1110yyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (88:16): [True: 0, False: 0]
  ------------------
   89|      0|        if (i + 2 >= str.length()) {
  ------------------
  |  Branch (89:13): [True: 0, False: 0]
  ------------------
   90|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   91|      0|        }
   92|      0|        char c1 = str[++i];
   93|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (93:13): [True: 0, False: 0]
  ------------------
   94|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   95|      0|        }
   96|      0|        char c2 = str[++i];
   97|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
   99|      0|        }
  100|      0|        return ((c0 & 0xF) << 12ul) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
  101|      0|    } else if ((c0 & 0xF8) == 0xF0) {  // 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
  ------------------
  |  Branch (101:16): [True: 0, False: 0]
  ------------------
  102|      0|        if (i + 3 >= str.length()) {
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  ------------------
  103|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  104|      0|        }
  105|      0|        char c1 = str[++i];
  106|      0|        if ((c1 & 0xC0) != 0x80) {
  ------------------
  |  Branch (106:13): [True: 0, False: 0]
  ------------------
  107|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  108|      0|        }
  109|      0|        char c2 = str[++i];
  110|      0|        if ((c2 & 0xC0) != 0x80) {
  ------------------
  |  Branch (110:13): [True: 0, False: 0]
  ------------------
  111|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  112|      0|        }
  113|      0|        char c3 = str[++i];
  114|      0|        if ((c3 & 0xC0) != 0x80) {
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return JSONNET_CODEPOINT_ERROR;
  ------------------
  |  |   21|      0|#define JSONNET_CODEPOINT_ERROR 0xfffd
  ------------------
  116|      0|        }
  117|      0|        return ((c0 & 0x7) << 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|  38.7k|}

_ZN7jsonnet8internal18jsonnet_vm_executeEPNS0_9AllocatorEPKNS0_3ASTERKNSt3__13mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS0_5VmExtENS6_4lessISD_EENSB_INS6_4pairIKSD_SE_EEEEEEjddRKNS7_ISD_NS0_16VmNativeCallbackESG_NSB_INSH_ISI_SO_EEEEEEPFiPvPKcSW_PPcSY_PmESU_b:
 3498|  3.23k|{
 3499|  3.23k|    Interpreter vm(alloc,
 3500|  3.23k|                   ext_vars,
 3501|  3.23k|                   max_stack,
 3502|  3.23k|                   gc_min_objects,
 3503|  3.23k|                   gc_growth_trigger,
 3504|  3.23k|                   natives,
 3505|  3.23k|                   import_callback,
 3506|  3.23k|                   ctx);
 3507|  3.23k|    vm.evaluate(ast, 0);
 3508|  3.23k|    if (string_output) {
  ------------------
  |  Branch (3508:9): [True: 0, False: 3.23k]
  ------------------
 3509|      0|        return encode_utf8(vm.manifestString(LocationRange("During manifestation")));
 3510|  3.23k|    } else {
 3511|  3.23k|        return encode_utf8(vm.manifestJson(LocationRange("During manifestation"), true, U""));
 3512|  3.23k|    }
 3513|  3.23k|}
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.23k|        : heap(gc_min_objects, gc_growth_trigger),
  946|  3.23k|          stack(max_stack),
  947|  3.23k|          alloc(alloc),
  948|  3.23k|          idImport(alloc->makeIdentifier(U"import")),
  949|  3.23k|          idArrayElement(alloc->makeIdentifier(U"array_element")),
  950|  3.23k|          idInvariant(alloc->makeIdentifier(U"object_assert")),
  951|  3.23k|          idInternal(alloc->makeIdentifier(U"__internal__")),
  952|  3.23k|          idJsonObjVar(alloc->makeIdentifier(U"_")),
  953|  3.23k|          idEmpty(alloc->makeIdentifier(U"")),
  954|  3.23k|          jsonObjVar(alloc->make<Var>(LocationRange(), Fodder{}, idJsonObjVar)),
  955|  3.23k|          externalVars(ext_vars),
  956|  3.23k|          importCallback(import_callback),
  957|  3.23k|          importCallbackContext(import_callback_context)
  958|  3.23k|    {
  959|  3.23k|        scratch = makeNull();
  960|       |        // Add a prefix to avoid conflicting with names from `native_callbacks`.
  961|  3.23k|        builtins["std:makeArray"] = &Interpreter::builtinMakeArray;
  962|  3.23k|        builtins["std:pow"] = &Interpreter::builtinPow;
  963|  3.23k|        builtins["std:floor"] = &Interpreter::builtinFloor;
  964|  3.23k|        builtins["std:ceil"] = &Interpreter::builtinCeil;
  965|  3.23k|        builtins["std:sqrt"] = &Interpreter::builtinSqrt;
  966|  3.23k|        builtins["std:sin"] = &Interpreter::builtinSin;
  967|  3.23k|        builtins["std:cos"] = &Interpreter::builtinCos;
  968|  3.23k|        builtins["std:tan"] = &Interpreter::builtinTan;
  969|  3.23k|        builtins["std:asin"] = &Interpreter::builtinAsin;
  970|  3.23k|        builtins["std:acos"] = &Interpreter::builtinAcos;
  971|  3.23k|        builtins["std:atan"] = &Interpreter::builtinAtan;
  972|  3.23k|        builtins["std:type"] = &Interpreter::builtinType;
  973|  3.23k|        builtins["std:filter"] = &Interpreter::builtinFilter;
  974|  3.23k|        builtins["std:objectHasEx"] = &Interpreter::builtinObjectHasEx;
  975|  3.23k|        builtins["std:length"] = &Interpreter::builtinLength;
  976|  3.23k|        builtins["std:objectFieldsEx"] = &Interpreter::builtinObjectFieldsEx;
  977|  3.23k|        builtins["std:objectRemoveKey"] = &Interpreter::builtinObjectRemoveKey;
  978|  3.23k|        builtins["std:codepoint"] = &Interpreter::builtinCodepoint;
  979|  3.23k|        builtins["std:char"] = &Interpreter::builtinChar;
  980|  3.23k|        builtins["std:log"] = &Interpreter::builtinLog;
  981|  3.23k|        builtins["std:exp"] = &Interpreter::builtinExp;
  982|  3.23k|        builtins["std:mantissa"] = &Interpreter::builtinMantissa;
  983|  3.23k|        builtins["std:exponent"] = &Interpreter::builtinExponent;
  984|  3.23k|        builtins["std:modulo"] = &Interpreter::builtinModulo;
  985|  3.23k|        builtins["std:extVar"] = &Interpreter::builtinExtVar;
  986|  3.23k|        builtins["std:primitiveEquals"] = &Interpreter::builtinPrimitiveEquals;
  987|  3.23k|        builtins["std:native"] = &Interpreter::builtinNative;
  988|  3.23k|        builtins["std:md5"] = &Interpreter::builtinMd5;
  989|  3.23k|        builtins["std:trace"] = &Interpreter::builtinTrace;
  990|  3.23k|        builtins["std:splitLimit"] = &Interpreter::builtinSplitLimit;
  991|  3.23k|        builtins["std:substr"] = &Interpreter::builtinSubstr;
  992|  3.23k|        builtins["std:range"] = &Interpreter::builtinRange;
  993|  3.23k|        builtins["std:strReplace"] = &Interpreter::builtinStrReplace;
  994|  3.23k|        builtins["std:asciiLower"] = &Interpreter::builtinAsciiLower;
  995|  3.23k|        builtins["std:asciiUpper"] = &Interpreter::builtinAsciiUpper;
  996|  3.23k|        builtins["std:join"] = &Interpreter::builtinJoin;
  997|  3.23k|        builtins["std:parseJson"] = &Interpreter::builtinParseJson;
  998|  3.23k|        builtins["std:parseYaml"] = &Interpreter::builtinParseYaml;
  999|  3.23k|        builtins["std:encodeUTF8"] = &Interpreter::builtinEncodeUTF8;
 1000|  3.23k|        builtins["std:decodeUTF8"] = &Interpreter::builtinDecodeUTF8;
 1001|  3.23k|        builtins["std:atan2"] = &Interpreter::builtinAtan2;
 1002|  3.23k|        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.23k|        for (const auto& [name, cb] : native_callbacks) {
  ------------------
  |  Branch (1007:37): [True: 0, False: 3.23k]
  ------------------
 1008|      0|            nativeCallbacks.emplace("native:" + name, cb);
 1009|      0|        }
 1010|       |
 1011|  3.23k|        DesugaredObject *stdlib = makeStdlibAST(alloc, "__internal__");
 1012|  3.23k|        jsonnet_static_analysis(stdlib);
 1013|  3.23k|        stdlibAST = stdlib; // stdlibAST is const, so we need to do analysis before this assignment
 1014|  3.23k|        auto stdThunk = makeHeap<HeapThunk>(nullptr, nullptr, 0, static_cast<const AST*>(stdlibAST));
 1015|  3.23k|        stack.newCall(stdThunk->body->location, stdThunk, stdThunk->self, stdThunk->offset, stdThunk->upValues);
 1016|  3.23k|        evaluate(stdThunk->body, 0);
 1017|  3.23k|        stdObject = dynamic_cast<HeapObject*>(scratch.v.h);
 1018|  3.23k|        prepareSourceValThunks();
 1019|  3.23k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15StackC2Ej:
  258|  3.23k|    Stack(unsigned limit) : calls(0), limit(limit) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeNullEv:
  634|   138k|    {
  635|   138k|        Value r;
  636|   138k|        r.t = Value::NULL_TYPE;
  637|   138k|        return r;
  638|   138k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack3topEv:
  291|   782M|    {
  292|   782M|        return stack.back();
  293|   782M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter19validateBuiltinArgsERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_6vectorINS1_5ValueENSA_ISG_EEEENSF_INSG_4TypeENSA_ISL_EEEE:
 1043|   270k|    {
 1044|   270k|        if (args.size() == params.size()) {
  ------------------
  |  Branch (1044:13): [True: 270k, False: 0]
  ------------------
 1045|   768k|            for (std::size_t i = 0; i < args.size(); ++i) {
  ------------------
  |  Branch (1045:37): [True: 498k, False: 270k]
  ------------------
 1046|   498k|                if (args[i].t != params[i])
  ------------------
  |  Branch (1046:21): [True: 0, False: 498k]
  ------------------
 1047|      0|                    goto bad;
 1048|   498k|            }
 1049|   270k|            return;
 1050|   270k|        }
 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|   270k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter9makeErrorERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  567|  1.30k|    {
  568|  1.30k|        return stack.makeError(loc, msg);
  569|  1.30k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack9makeErrorERKNS0_13LocationRangeERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  368|  1.93k|    {
  369|  1.93k|        std::vector<TraceFrame> stack_trace;
  370|  1.93k|        stack_trace.push_back(TraceFrame(loc));
  371|   612k|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (371:40): [True: 610k, False: 1.93k]
  ------------------
  372|   610k|            const auto &f = stack[i];
  373|   610k|            if (f.isCall()) {
  ------------------
  |  Branch (373:17): [True: 331k, False: 279k]
  ------------------
  374|   331k|                if (f.context != nullptr) {
  ------------------
  |  Branch (374:21): [True: 331k, False: 0]
  ------------------
  375|       |                    // Give the last line a name.
  376|   331k|                    stack_trace[stack_trace.size() - 1].name = getName(i, f.context);
  377|   331k|                }
  378|   331k|                if (f.location.isSet() || f.location.file.length() > 0)
  ------------------
  |  Branch (378:21): [True: 266k, False: 64.6k]
  |  Branch (378:43): [True: 926, False: 63.6k]
  ------------------
  379|   267k|                    stack_trace.push_back(TraceFrame(f.location));
  380|   331k|            }
  381|   610k|        }
  382|  1.93k|        return RuntimeError(stack_trace, msg);
  383|  1.93k|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Frame6isCallEv:
  241|   957M|    {
  242|   957M|        return kind == FRAME_CALL;
  243|   957M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack7getNameEjPKNS1_10HeapEntityE:
  313|   331k|    {
  314|   331k|        std::string name;
  315|   601k|        for (int i = from_here - 1; i >= 0; --i) {
  ------------------
  |  Branch (315:37): [True: 599k, False: 1.90k]
  ------------------
  316|   599k|            const auto &f = stack[i];
  317|   601k|            for (const auto &pair : f.bindings) {
  ------------------
  |  Branch (317:35): [True: 601k, False: 599k]
  ------------------
  318|   601k|                HeapThunk *thunk = pair.second;
  319|   601k|                if (!thunk->filled)
  ------------------
  |  Branch (319:21): [True: 249k, False: 352k]
  ------------------
  320|   249k|                    continue;
  321|   352k|                if (!thunk->content.isHeap())
  ------------------
  |  Branch (321:21): [True: 69.9k, False: 282k]
  ------------------
  322|  69.9k|                    continue;
  323|   282k|                if (e != thunk->content.v.h)
  ------------------
  |  Branch (323:21): [True: 213k, False: 68.8k]
  ------------------
  324|   213k|                    continue;
  325|  68.8k|                name = encode_utf8(pair.first->name);
  326|  68.8k|            }
  327|       |            // Do not go into the next call frame, keep local reasoning.
  328|   599k|            if (f.isCall())
  ------------------
  |  Branch (328:17): [True: 329k, False: 269k]
  ------------------
  329|   329k|                break;
  330|   599k|        }
  331|       |
  332|   331k|        if (name == "")
  ------------------
  |  Branch (332:13): [True: 262k, False: 68.8k]
  ------------------
  333|   262k|            name = "anonymous";
  334|   331k|        if (dynamic_cast<const HeapObject *>(e)) {
  ------------------
  |  Branch (334:13): [True: 178k, False: 152k]
  ------------------
  335|   178k|            return "object <" + name + ">";
  336|   178k|        } else if (auto *thunk = dynamic_cast<const HeapThunk *>(e)) {
  ------------------
  |  Branch (336:26): [True: 80.4k, False: 72.4k]
  ------------------
  337|  80.4k|            if (thunk->name == nullptr) {
  ------------------
  |  Branch (337:17): [True: 5.38k, False: 75.1k]
  ------------------
  338|  5.38k|                return "";  // Argument of builtin, or root (since top level functions).
  339|  75.1k|            } else {
  340|  75.1k|                return "thunk <" + encode_utf8(thunk->name->name) + ">";
  341|  75.1k|            }
  342|  80.4k|        } else {
  343|  72.4k|            const auto *func = static_cast<const HeapClosure *>(e);
  344|  72.4k|            if (func->isBuiltin()) {
  ------------------
  |  Branch (344:17): [True: 0, False: 72.4k]
  ------------------
  345|      0|                return "builtin function <" + func->builtinName + ">";
  346|      0|            }
  347|  72.4k|            return "function <" + name + ">";
  348|  72.4k|        }
  349|   331k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack4markERNS1_4HeapE:
  284|   147k|    {
  285|  26.0M|        for (const auto &f : stack) {
  ------------------
  |  Branch (285:28): [True: 26.0M, False: 147k]
  ------------------
  286|  26.0M|            f.mark(heap);
  287|  26.0M|        }
  288|   147k|    }
vm.cpp:_ZNK7jsonnet8internal12_GLOBAL__N_15Frame4markERNS1_4HeapE:
  225|  26.0M|    {
  226|  26.0M|        heap.markFrom(val);
  227|  26.0M|        heap.markFrom(val2);
  228|  26.0M|        if (context)
  ------------------
  |  Branch (228:13): [True: 17.3M, False: 8.74M]
  ------------------
  229|  17.3M|            heap.markFrom(context);
  230|  26.0M|        if (self)
  ------------------
  |  Branch (230:13): [True: 17.2M, False: 8.77M]
  ------------------
  231|  17.2M|            heap.markFrom(self);
  232|  26.0M|        for (const auto &bind : bindings)
  ------------------
  |  Branch (232:31): [True: 31.0M, False: 26.0M]
  ------------------
  233|  31.0M|            heap.markFrom(bind.second);
  234|  26.0M|        for (const auto &el : elements)
  ------------------
  |  Branch (234:29): [True: 0, False: 26.0M]
  ------------------
  235|      0|            heap.markFrom(el.second);
  236|  26.0M|        for (const auto &th : thunks)
  ------------------
  |  Branch (236:29): [True: 1.85M, False: 26.0M]
  ------------------
  237|  1.85M|            heap.markFrom(th);
  238|  26.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeNumberEd:
  615|  9.38M|    {
  616|  9.38M|        Value r;
  617|  9.38M|        r.t = Value::NUMBER;
  618|  9.38M|        r.v.d = v;
  619|  9.38M|        return r;
  620|  9.38M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter9makeArrayERKNSt3__16vectorIPNS1_9HeapThunkENS3_9allocatorIS6_EEEE:
  641|   855k|    {
  642|   855k|        Value r;
  643|   855k|        r.t = Value::ARRAY;
  644|   855k|        r.v.h = makeHeap<HeapArray>(v);
  645|   855k|        return r;
  646|   855k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapArrayEJRKNSt3__16vectorIPNS1_9HeapThunkENS5_9allocatorIS8_EEEEEEEPT_DpOT0_:
  577|   855k|    {
  578|   855k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   855k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 1.55k, False: 854k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  1.55k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  1.55k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  1.55k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  1.55k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 1.55k]
  ------------------
  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|   249k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 249k, False: 1.55k]
  ------------------
  597|   249k|                heap.markFrom(sourceVal.second);
  598|   249k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  1.55k|            heap.sweep();
  602|  1.55k|        }
  603|   855k|        return r;
  604|   855k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10builtinPowERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1103|  6.21k|    {
 1104|  6.21k|        validateBuiltinArgs(loc, "pow", args, {Value::NUMBER, Value::NUMBER});
 1105|  6.21k|        scratch = makeNumberCheck(loc, std::pow(args[0].v.d, args[1].v.d));
 1106|  6.21k|        return nullptr;
 1107|  6.21k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter15makeNumberCheckERKNS0_13LocationRangeEd:
  623|  8.49M|    {
  624|  8.49M|        if (std::isnan(v)) {
  ------------------
  |  Branch (624:13): [True: 0, False: 8.49M]
  ------------------
  625|      0|            throw makeError(loc, "not a number");
  626|      0|        }
  627|  8.49M|        if (std::isinf(v)) {
  ------------------
  |  Branch (627:13): [True: 40, False: 8.49M]
  ------------------
  628|     40|            throw makeError(loc, "overflow");
  629|     40|        }
  630|  8.49M|        return makeNumber(v);
  631|  8.49M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12builtinFloorERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1110|  37.0k|    {
 1111|  37.0k|        validateBuiltinArgs(loc, "floor", args, {Value::NUMBER});
 1112|  37.0k|        scratch = makeNumberCheck(loc, std::floor(args[0].v.d));
 1113|  37.0k|        return nullptr;
 1114|  37.0k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11builtinTypeERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1187|  4.04M|    {
 1188|  4.04M|        switch (args[0].t) {
  ------------------
  |  Branch (1188:17): [True: 4.04M, False: 0]
  ------------------
 1189|   185k|            case Value::NULL_TYPE: scratch = makeString(U"null"); return nullptr;
  ------------------
  |  Branch (1189:13): [True: 185k, False: 3.85M]
  ------------------
 1190|       |
 1191|   106k|            case Value::BOOLEAN: scratch = makeString(U"boolean"); return nullptr;
  ------------------
  |  Branch (1191:13): [True: 106k, False: 3.93M]
  ------------------
 1192|       |
 1193|   458k|            case Value::NUMBER: scratch = makeString(U"number"); return nullptr;
  ------------------
  |  Branch (1193:13): [True: 458k, False: 3.58M]
  ------------------
 1194|       |
 1195|   175k|            case Value::ARRAY: scratch = makeString(U"array"); return nullptr;
  ------------------
  |  Branch (1195:13): [True: 175k, False: 3.86M]
  ------------------
 1196|       |
 1197|  3.48k|            case Value::FUNCTION: scratch = makeString(U"function"); return nullptr;
  ------------------
  |  Branch (1197:13): [True: 3.48k, False: 4.03M]
  ------------------
 1198|       |
 1199|   330k|            case Value::OBJECT: scratch = makeString(U"object"); return nullptr;
  ------------------
  |  Branch (1199:13): [True: 330k, False: 3.71M]
  ------------------
 1200|       |
 1201|  2.78M|            case Value::STRING: scratch = makeString(U"string"); return nullptr;
  ------------------
  |  Branch (1201:13): [True: 2.78M, False: 1.25M]
  ------------------
 1202|  4.04M|        }
 1203|      0|        return nullptr;  // Quiet, compiler.
 1204|  4.04M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeStringERKNSt3__112basic_stringIDiNS3_11char_traitsIDiEENS3_9allocatorIDiEEEE:
  679|  47.2M|    {
  680|  47.2M|        Value r;
  681|  47.2M|        r.t = Value::STRING;
  682|  47.2M|        r.v.h = makeHeap<HeapString>(v);
  683|  47.2M|        return r;
  684|  47.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_10HeapStringEJRKNSt3__112basic_stringIDiNS5_11char_traitsIDiEENS5_9allocatorIDiEEEEEEEPT_DpOT0_:
  577|  47.2M|    {
  578|  47.2M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  47.2M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 60.9k, False: 47.1M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  60.9k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  60.9k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  60.9k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  60.9k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 60.9k]
  ------------------
  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|  9.81M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 9.81M, False: 60.9k]
  ------------------
  597|  9.81M|                heap.markFrom(sourceVal.second);
  598|  9.81M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  60.9k|            heap.sweep();
  602|  60.9k|        }
  603|  47.2M|        return r;
  604|  47.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter18builtinObjectHasExERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1234|    850|    {
 1235|    850|        validateBuiltinArgs(
 1236|    850|            loc, "objectHasEx", args, {Value::OBJECT, Value::STRING, Value::BOOLEAN});
 1237|    850|        const auto *obj = static_cast<const HeapObject *>(args[0].v.h);
 1238|    850|        const auto *str = static_cast<const HeapString *>(args[1].v.h);
 1239|    850|        bool include_hidden = args[2].v.b;
 1240|    850|        bool found = false;
 1241|  2.29k|        for (const auto &field : objectFields(obj, !include_hidden)) {
  ------------------
  |  Branch (1241:32): [True: 2.29k, False: 33]
  ------------------
 1242|  2.29k|            if (field->name == str->value) {
  ------------------
  |  Branch (1242:17): [True: 817, False: 1.47k]
  ------------------
 1243|    817|                found = true;
 1244|    817|                break;
 1245|    817|            }
 1246|  2.29k|        }
 1247|    850|        scratch = makeBoolean(found);
 1248|    850|        return nullptr;
 1249|    850|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12objectFieldsEPKNS1_10HeapObjectEb:
  773|   381k|    {
  774|   381k|        std::set<const Identifier *> r;
  775|  1.08M|        for (const auto &pair : objectFieldsAux(obj_)) {
  ------------------
  |  Branch (775:31): [True: 1.08M, False: 381k]
  ------------------
  776|  1.08M|            if (!manifesting || pair.second != ObjectField::HIDDEN)
  ------------------
  |  Branch (776:17): [True: 3.80k, False: 1.08M]
  |  Branch (776:33): [True: 933k, False: 148k]
  ------------------
  777|   937k|                r.insert(pair.first);
  778|  1.08M|        }
  779|   381k|        return r;
  780|   381k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter15objectFieldsAuxEPKNS1_10HeapObjectE:
  740|  17.2M|    {
  741|  17.2M|        IdHideMap r;
  742|  17.2M|        if (auto *obj = dynamic_cast<const HeapSimpleObject *>(obj_)) {
  ------------------
  |  Branch (742:19): [True: 8.82M, False: 8.44M]
  ------------------
  743|  8.82M|            for (const auto &f : obj->fields) {
  ------------------
  |  Branch (743:32): [True: 6.58M, False: 8.82M]
  ------------------
  744|  6.58M|                r[f.first] = f.second.hide;
  745|  6.58M|            }
  746|       |
  747|  8.82M|        } else if (auto *obj = dynamic_cast<const HeapRestrictedObject *>(obj_)) {
  ------------------
  |  Branch (747:26): [True: 0, False: 8.44M]
  ------------------
  748|      0|            return obj->retainedKeys;
  749|       |
  750|  8.44M|        } else if (auto *obj = dynamic_cast<const HeapExtendedObject *>(obj_)) {
  ------------------
  |  Branch (750:26): [True: 8.44M, False: 0]
  ------------------
  751|  8.44M|            r = objectFieldsAux(obj->right);
  752|  17.8M|            for (const auto &pair : objectFieldsAux(obj->left)) {
  ------------------
  |  Branch (752:35): [True: 17.8M, False: 8.44M]
  ------------------
  753|  17.8M|                auto it = r.find(pair.first);
  754|  17.8M|                if (it == r.end()) {
  ------------------
  |  Branch (754:21): [True: 12.3M, False: 5.49M]
  ------------------
  755|       |                    // First time it is seen
  756|  12.3M|                    r[pair.first] = pair.second;
  757|  12.3M|                } else if (it->second == ObjectField::INHERIT) {
  ------------------
  |  Branch (757:28): [True: 5.13M, False: 365k]
  ------------------
  758|       |                    // Seen before, but with inherited visibility so use new visibility
  759|  5.13M|                    r[pair.first] = pair.second;
  760|  5.13M|                }
  761|  17.8M|            }
  762|       |
  763|  8.44M|        } 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|  17.2M|        return r;
  768|  17.2M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeBooleanEb:
  607|  13.5M|    {
  608|  13.5M|        Value r;
  609|  13.5M|        r.t = Value::BOOLEAN;
  610|  13.5M|        r.v.b = v;
  611|  13.5M|        return r;
  612|  13.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinLengthERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1252|   762k|    {
 1253|   762k|        if (args.size() != 1) {
  ------------------
  |  Branch (1253:13): [True: 0, False: 762k]
  ------------------
 1254|      0|            throw makeError(loc, "length takes 1 parameter.");
 1255|      0|        }
 1256|   762k|        HeapEntity *e = args[0].v.h;
 1257|   762k|        switch (args[0].t) {
 1258|      0|            case Value::OBJECT: {
  ------------------
  |  Branch (1258:13): [True: 0, False: 762k]
  ------------------
 1259|      0|                auto fields = objectFields(static_cast<HeapObject *>(e), true);
 1260|      0|                scratch = makeNumber(fields.size());
 1261|      0|            } break;
 1262|       |
 1263|   293k|            case Value::ARRAY:
  ------------------
  |  Branch (1263:13): [True: 293k, False: 469k]
  ------------------
 1264|   293k|                scratch = makeNumber(static_cast<HeapArray *>(e)->elements.size());
 1265|   293k|                break;
 1266|       |
 1267|   469k|            case Value::STRING:
  ------------------
  |  Branch (1267:13): [True: 469k, False: 293k]
  ------------------
 1268|   469k|                scratch = makeNumber(static_cast<HeapString *>(e)->value.length());
 1269|   469k|                break;
 1270|       |
 1271|      0|            case Value::FUNCTION:
  ------------------
  |  Branch (1271:13): [True: 0, False: 762k]
  ------------------
 1272|      0|                scratch = makeNumber(static_cast<HeapClosure *>(e)->params.size());
 1273|      0|                break;
 1274|       |
 1275|      0|            default:
  ------------------
  |  Branch (1275:13): [True: 0, False: 762k]
  ------------------
 1276|      0|                throw makeError(loc,
 1277|      0|                                "length operates on strings, objects, "
 1278|      0|                                "and arrays, got " +
 1279|      0|                                    type_str(args[0]));
 1280|   762k|        }
 1281|   762k|        return nullptr;
 1282|   762k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter21builtinObjectFieldsExERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1285|   168k|    {
 1286|   168k|        validateBuiltinArgs(loc, "objectFieldsEx", args, {Value::OBJECT, Value::BOOLEAN});
 1287|   168k|        const auto *obj = static_cast<HeapObject *>(args[0].v.h);
 1288|   168k|        bool include_hidden = args[1].v.b;
 1289|       |        // Stash in a set first to sort them.
 1290|   168k|        std::set<UString> fields;
 1291|   532k|        for (const auto &field : objectFields(obj, !include_hidden)) {
  ------------------
  |  Branch (1291:32): [True: 532k, False: 168k]
  ------------------
 1292|   532k|            fields.insert(field->name);
 1293|   532k|        }
 1294|   168k|        scratch = makeArray({});
 1295|   168k|        auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 1296|   532k|        for (const auto &field : fields) {
  ------------------
  |  Branch (1296:32): [True: 532k, False: 168k]
  ------------------
 1297|   532k|            auto *th = makeHeap<HeapThunk>(idArrayElement, nullptr, 0, nullptr);
 1298|   532k|            elements.push_back(th);
 1299|   532k|            th->fill(makeString(field));
 1300|   532k|        }
 1301|   168k|        return nullptr;
 1302|   168k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierEDniDnEEEPT_DpOT0_:
  577|   532k|    {
  578|   532k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   532k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 594, False: 531k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|    594|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|    594|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|    594|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|    594|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 594]
  ------------------
  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|  95.6k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 95.6k, False: 594]
  ------------------
  597|  95.6k|                heap.markFrom(sourceVal.second);
  598|  95.6k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|    594|            heap.sweep();
  602|    594|        }
  603|   532k|        return r;
  604|   532k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11builtinCharERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1335|  1.48k|    {
 1336|  1.48k|        validateBuiltinArgs(loc, "char", args, {Value::NUMBER});
 1337|  1.48k|        long l = long(args[0].v.d);
 1338|  1.48k|        if (l < 0) {
  ------------------
  |  Branch (1338:13): [True: 49, False: 1.43k]
  ------------------
 1339|     49|            std::stringstream ss;
 1340|     49|            ss << "codepoints must be >= 0, got " << l;
 1341|     49|            throw makeError(loc, ss.str());
 1342|     49|        }
 1343|  1.43k|        if (l >= JSONNET_CODEPOINT_MAX) {
  ------------------
  |  |   22|  1.43k|#define JSONNET_CODEPOINT_MAX 0x110000
  ------------------
  |  Branch (1343:13): [True: 38, False: 1.39k]
  ------------------
 1344|     38|            std::stringstream ss;
 1345|     38|            ss << "invalid unicode codepoint, got " << l;
 1346|     38|            throw makeError(loc, ss.str());
 1347|     38|        }
 1348|  1.39k|        char32_t c = l;
 1349|  1.39k|        scratch = makeString(UString(&c, 1));
 1350|  1.39k|        return nullptr;
 1351|  1.43k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10builtinLogERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1354|  4.78k|    {
 1355|  4.78k|        validateBuiltinArgs(loc, "log", args, {Value::NUMBER});
 1356|  4.78k|        scratch = makeNumberCheck(loc, std::log(args[0].v.d));
 1357|  4.78k|        return nullptr;
 1358|  4.78k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinModuloERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1386|  50.6k|    {
 1387|  50.6k|        validateBuiltinArgs(loc, "modulo", args, {Value::NUMBER, Value::NUMBER});
 1388|  50.6k|        double a = args[0].v.d;
 1389|  50.6k|        double b = args[1].v.d;
 1390|  50.6k|        if (b == 0)
  ------------------
  |  Branch (1390:13): [True: 16, False: 50.6k]
  ------------------
 1391|     16|            throw makeError(loc, "division by zero.");
 1392|  50.6k|        scratch = makeNumberCheck(loc, std::fmod(a, b));
 1393|  50.6k|        return nullptr;
 1394|  50.6k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack3popEv:
  301|   147M|    {
  302|   147M|        if (top().isCall())
  ------------------
  |  Branch (302:13): [True: 58.2M, False: 89.3M]
  ------------------
  303|  58.2M|            calls--;
  304|   147M|        stack.pop_back();
  305|   147M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter22builtinPrimitiveEqualsERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1422|  6.40M|    {
 1423|  6.40M|        if (args.size() != 2) {
  ------------------
  |  Branch (1423:13): [True: 0, False: 6.40M]
  ------------------
 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|  6.40M|        if (args[0].t != args[1].t) {
  ------------------
  |  Branch (1428:13): [True: 0, False: 6.40M]
  ------------------
 1429|      0|            scratch = makeBoolean(false);
 1430|      0|            return nullptr;
 1431|      0|        }
 1432|  6.40M|        bool r;
 1433|  6.40M|        switch (args[0].t) {
 1434|  7.29k|            case Value::BOOLEAN: r = args[0].v.b == args[1].v.b; break;
  ------------------
  |  Branch (1434:13): [True: 7.29k, False: 6.39M]
  ------------------
 1435|       |
 1436|   150k|            case Value::NUMBER: r = args[0].v.d == args[1].v.d; break;
  ------------------
  |  Branch (1436:13): [True: 150k, False: 6.24M]
  ------------------
 1437|       |
 1438|  6.18M|            case Value::STRING:
  ------------------
  |  Branch (1438:13): [True: 6.18M, False: 215k]
  ------------------
 1439|  6.18M|                r = static_cast<HeapString *>(args[0].v.h)->value ==
 1440|  6.18M|                    static_cast<HeapString *>(args[1].v.h)->value;
 1441|  6.18M|                break;
 1442|       |
 1443|  57.3k|            case Value::NULL_TYPE: r = true; break;
  ------------------
  |  Branch (1443:13): [True: 57.3k, False: 6.34M]
  ------------------
 1444|       |
 1445|      0|            case Value::FUNCTION: throw makeError(loc, "cannot test equality of functions"); break;
  ------------------
  |  Branch (1445:13): [True: 0, False: 6.40M]
  ------------------
 1446|       |
 1447|      0|            default:
  ------------------
  |  Branch (1447:13): [True: 0, False: 6.40M]
  ------------------
 1448|      0|                throw makeError(loc,
 1449|      0|                                "primitiveEquals operates on primitive "
 1450|      0|                                "types, got " +
 1451|      0|                                    type_str(args[0]));
 1452|  6.40M|        }
 1453|  6.40M|        scratch = makeBoolean(r);
 1454|  6.40M|        return nullptr;
 1455|  6.40M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter18makeBuiltinFromASTEPKNS0_19BuiltinFunctionBodyE:
  658|  11.4M|    {
  659|  11.4M|        HeapClosure::Params hc_params;
  660|  18.1M|        for (const auto p : body->params) {
  ------------------
  |  Branch (660:27): [True: 18.1M, False: 11.4M]
  ------------------
  661|  18.1M|            hc_params.emplace_back(p, nullptr);
  662|  18.1M|        }
  663|  11.4M|        Value r;
  664|  11.4M|        r.t = Value::FUNCTION;
  665|  11.4M|        r.v.h = makeHeap<HeapClosure>(BindingFrame(), nullptr, 0, hc_params, body, body->name);
  666|  11.4M|        return r;
  667|  11.4M|    }
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|  11.4M|    {
  578|  11.4M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  11.4M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 12.5k, False: 11.4M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  12.5k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  12.5k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  12.5k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  12.5k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 12.5k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|  2.02M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 2.02M, False: 12.5k]
  ------------------
  597|  2.02M|                heap.markFrom(sourceVal.second);
  598|  2.02M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  12.5k|            heap.sweep();
  602|  12.5k|        }
  603|  11.4M|        return r;
  604|  11.4M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13builtinSubstrERKNS0_13LocationRangeERKNSt3__16vectorINS1_5ValueENS6_9allocatorIS8_EEEE:
 1599|    893|    {
 1600|    893|        validateBuiltinArgs(loc, "substr", args, {Value::STRING, Value::NUMBER, Value::NUMBER});
 1601|    893|        const auto *str = static_cast<const HeapString *>(args[0].v.h);
 1602|    893|        long from = long(args[1].v.d);
 1603|    893|        long len = long(args[2].v.d);
 1604|    893|        if (from < 0) {
  ------------------
  |  Branch (1604:13): [True: 0, False: 893]
  ------------------
 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|    893|        if (len < 0) {
  ------------------
  |  Branch (1609:13): [True: 0, False: 893]
  ------------------
 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|    893|        if (static_cast<unsigned long>(from) > str->value.size()) {
  ------------------
  |  Branch (1614:13): [True: 0, False: 893]
  ------------------
 1615|      0|            scratch = makeString(UString());
 1616|      0|            return nullptr;
 1617|      0|        }
 1618|    893|        if (size_t(len + from) > str->value.size()) {
  ------------------
  |  Branch (1618:13): [True: 0, False: 893]
  ------------------
 1619|      0|          len = str->value.size() - from;
 1620|      0|        }
 1621|    893|        scratch = makeString(str->value.substr(from, len));
 1622|    893|        return nullptr;
 1623|    893|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJDnDniPKNS0_3ASTEEEEPT_DpOT0_:
  577|  3.23k|    {
  578|  3.23k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  3.23k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 3.23k]
  ------------------
  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.23k|        return r;
  604|  3.23k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack7newCallERKNS0_13LocationRangeEPNS1_10HeapEntityEPNS1_10HeapObjectEjRKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENSA_4lessISE_EENSA_9allocatorINSA_4pairIKSE_SG_EEEEEE:
  418|  58.8M|    {
  419|  58.8M|        tailCallTrimStack();
  420|  58.8M|        if (calls >= limit) {
  ------------------
  |  Branch (420:13): [True: 630, False: 58.8M]
  ------------------
  421|    630|            throw makeError(loc, "max stack frames exceeded.");
  422|    630|        }
  423|  58.8M|        stack.emplace_back(FRAME_CALL, loc);
  424|  58.8M|        calls++;
  425|  58.8M|        top().context = context;
  426|  58.8M|        top().self = self;
  427|  58.8M|        top().offset = offset;
  428|  58.8M|        top().bindings = up_values;
  429|  58.8M|        top().tailCall = false;
  430|       |
  431|  58.8M|#ifndef NDEBUG
  432|  70.0M|        for (const auto &bind : up_values) {
  ------------------
  |  Branch (432:31): [True: 70.0M, False: 58.8M]
  ------------------
  433|  70.0M|            if (bind.second == nullptr) {
  ------------------
  |  Branch (433:17): [True: 0, False: 70.0M]
  ------------------
  434|      0|                std::cerr << "INTERNAL ERROR: No binding for variable "
  435|      0|                          << encode_utf8(bind.first->name) << std::endl;
  436|      0|                std::abort();
  437|      0|            }
  438|  70.0M|        }
  439|  58.8M|#endif
  440|  58.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack17tailCallTrimStackEv:
  394|  58.8M|    {
  395|  59.8M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (395:40): [True: 59.3M, False: 555k]
  ------------------
  396|  59.3M|            switch (stack[i].kind) {
  397|  16.5M|                case FRAME_CALL: {
  ------------------
  |  Branch (397:17): [True: 16.5M, False: 42.8M]
  ------------------
  398|  16.5M|                    if (!stack[i].tailCall || stack[i].thunks.size() > 0) {
  ------------------
  |  Branch (398:25): [True: 11.4M, False: 5.06M]
  |  Branch (398:47): [True: 4.76M, False: 291k]
  ------------------
  399|  16.2M|                        return;
  400|  16.2M|                    }
  401|       |                    // Remove all stack frames including this one.
  402|  1.00M|                    while (stack.size() > unsigned(i))
  ------------------
  |  Branch (402:28): [True: 714k, False: 291k]
  ------------------
  403|   714k|                        stack.pop_back();
  404|   291k|                    calls--;
  405|   291k|                    return;
  406|  16.5M|                } break;
  407|       |
  408|  1.03M|                case FRAME_LOCAL: break;
  ------------------
  |  Branch (408:17): [True: 1.03M, False: 58.3M]
  ------------------
  409|       |
  410|  41.8M|                default: return;
  ------------------
  |  Branch (410:17): [True: 41.8M, False: 17.5M]
  ------------------
  411|  59.3M|            }
  412|  59.3M|        }
  413|  58.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15FrameC2ERKNS1_9FrameKindERKNS0_13LocationRangeE:
  209|  73.7M|        : kind(kind),
  210|  73.7M|          ast(nullptr),
  211|  73.7M|          location(location),
  212|  73.7M|          tailCall(false),
  213|  73.7M|          elementId(0),
  214|  73.7M|          first(false),
  215|  73.7M|          context(NULL),
  216|  73.7M|          self(NULL),
  217|  73.7M|          offset(0)
  218|  73.7M|    {
  219|  73.7M|        val.t = Value::NULL_TYPE;
  220|  73.7M|        val2.t = Value::NULL_TYPE;
  221|  73.7M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter22prepareSourceValThunksEv:
  887|  3.23k|    void prepareSourceValThunks() {
  888|   520k|        for (const auto &field : stdlibAST->fields) {
  ------------------
  |  Branch (888:32): [True: 520k, False: 3.23k]
  ------------------
  889|   520k|            AST *nameAST = field.name;
  890|   520k|            if (nameAST->type != AST_LITERAL_STRING) {
  ------------------
  |  Branch (890:17): [True: 0, False: 520k]
  ------------------
  891|       |                // Skip any fields without a known name.
  892|      0|                continue;
  893|      0|            }
  894|   520k|            UString name = dynamic_cast<LiteralString *>(nameAST)->value;
  895|       |
  896|   520k|            sourceFuncIds.emplace_back(new Identifier(name));
  897|   520k|            auto *th = makeHeap<HeapThunk>(sourceFuncIds.back().get(), stdObject, 0, field.body);
  898|   520k|            sourceVals[encode_utf8(name)] = th;
  899|   520k|        }
  900|  3.23k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJPNS0_10IdentifierERPNS1_10HeapObjectEiRKPNS0_3ASTEEEEPT_DpOT0_:
  577|   520k|    {
  578|   520k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   520k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 520k]
  ------------------
  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|   520k|        return r;
  604|   520k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15StackD2Ev:
  260|  3.23k|    ~Stack(void) {}
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8evaluateEPKNS0_3ASTEj:
 2096|  3.34M|    {
 2097|   172M|    recurse:
 2098|       |
 2099|   172M|        switch (ast_->type) {
 2100|  15.9M|            case AST_APPLY: {
  ------------------
  |  Branch (2100:13): [True: 15.9M, False: 156M]
  ------------------
 2101|  15.9M|                const auto &ast = *static_cast<const Apply *>(ast_);
 2102|  15.9M|                stack.newFrame(FRAME_APPLY_TARGET, ast_);
 2103|  15.9M|                ast_ = ast.target;
 2104|  15.9M|                goto recurse;
 2105|      0|            } break;
 2106|       |
 2107|   397k|            case AST_ARRAY: {
  ------------------
  |  Branch (2107:13): [True: 397k, False: 171M]
  ------------------
 2108|   397k|                const auto &ast = *static_cast<const Array *>(ast_);
 2109|   397k|                HeapObject *self;
 2110|   397k|                unsigned offset;
 2111|   397k|                stack.getSelfBinding(self, offset);
 2112|   397k|                scratch = makeArray({});
 2113|   397k|                auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 2114|  5.50M|                for (const auto &el : ast.elements) {
  ------------------
  |  Branch (2114:37): [True: 5.50M, False: 397k]
  ------------------
 2115|  5.50M|                    auto *el_th = makeHeap<HeapThunk>(idArrayElement, self, offset, el.expr);
 2116|  5.50M|                    el_th->upValues = capture(el.expr->freeVariables);
 2117|  5.50M|                    elements.push_back(el_th);
 2118|  5.50M|                }
 2119|   397k|            } break;
 2120|       |
 2121|  8.33M|            case AST_BINARY: {
  ------------------
  |  Branch (2121:13): [True: 8.33M, False: 163M]
  ------------------
 2122|  8.33M|                const auto &ast = *static_cast<const Binary *>(ast_);
 2123|  8.33M|                stack.newFrame(FRAME_BINARY_LEFT, ast_);
 2124|  8.33M|                ast_ = ast.left;
 2125|  8.33M|                goto recurse;
 2126|      0|            } break;
 2127|       |
 2128|  11.4M|            case AST_BUILTIN_FUNCTION: {
  ------------------
  |  Branch (2128:13): [True: 11.4M, False: 160M]
  ------------------
 2129|  11.4M|                const auto &ast = *static_cast<const BuiltinFunction *>(ast_);
 2130|  11.4M|                scratch = makeBuiltinFromAST(ast.body);
 2131|  11.4M|            } break;
 2132|       |
 2133|      0|            case AST_BUILTIN_FUNCTION_BODY: {
  ------------------
  |  Branch (2133:13): [True: 0, False: 172M]
  ------------------
 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|  10.1M|            case AST_CONDITIONAL: {
  ------------------
  |  Branch (2157:13): [True: 10.1M, False: 162M]
  ------------------
 2158|  10.1M|                const auto &ast = *static_cast<const Conditional *>(ast_);
 2159|  10.1M|                stack.newFrame(FRAME_IF, ast_);
 2160|  10.1M|                ast_ = ast.cond;
 2161|  10.1M|                goto recurse;
 2162|      0|            } break;
 2163|       |
 2164|  6.94k|            case AST_ERROR: {
  ------------------
  |  Branch (2164:13): [True: 6.94k, False: 172M]
  ------------------
 2165|  6.94k|                const auto &ast = *static_cast<const Error *>(ast_);
 2166|  6.94k|                stack.newFrame(FRAME_ERROR, ast_);
 2167|  6.94k|                ast_ = ast.expr;
 2168|  6.94k|                goto recurse;
 2169|      0|            } break;
 2170|       |
 2171|  2.66M|            case AST_FUNCTION: {
  ------------------
  |  Branch (2171:13): [True: 2.66M, False: 169M]
  ------------------
 2172|  2.66M|                const auto &ast = *static_cast<const Function *>(ast_);
 2173|  2.66M|                auto env = capture(ast.freeVariables);
 2174|  2.66M|                HeapObject *self;
 2175|  2.66M|                unsigned offset;
 2176|  2.66M|                stack.getSelfBinding(self, offset);
 2177|  2.66M|                HeapClosure::Params params;
 2178|  2.66M|                params.reserve(ast.params.size());
 2179|  5.09M|                for (const auto &p : ast.params) {
  ------------------
  |  Branch (2179:36): [True: 5.09M, False: 2.66M]
  ------------------
 2180|  5.09M|                    params.emplace_back(p.id, p.expr);
 2181|  5.09M|                }
 2182|  2.66M|                scratch = makeClosure(env, self, offset, params, ast.body);
 2183|  2.66M|            } break;
 2184|       |
 2185|      6|            case AST_IMPORT: {
  ------------------
  |  Branch (2185:13): [True: 6, False: 172M]
  ------------------
 2186|      6|                const auto &ast = *static_cast<const Import *>(ast_);
 2187|      6|                HeapThunk *thunk = import(ast.location, ast.file);
 2188|      6|                if (thunk->filled) {
  ------------------
  |  Branch (2188:21): [True: 0, False: 6]
  ------------------
 2189|      0|                    scratch = thunk->content;
 2190|      6|                } else {
 2191|      6|                    stack.newCall(ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2192|      6|                    ast_ = thunk->body;
 2193|      6|                    goto recurse;
 2194|      6|                }
 2195|      6|            } break;
 2196|       |
 2197|      8|            case AST_IMPORTSTR: {
  ------------------
  |  Branch (2197:13): [True: 8, False: 172M]
  ------------------
 2198|      8|                const auto &ast = *static_cast<const Importstr *>(ast_);
 2199|      8|                const ImportCacheValue *value = importData(ast.location, ast.file);
 2200|      8|                scratch = makeString(decode_utf8(value->content));
 2201|      8|            } break;
 2202|       |
 2203|      4|            case AST_IMPORTBIN: {
  ------------------
  |  Branch (2203:13): [True: 4, False: 172M]
  ------------------
 2204|      4|                const auto &ast = *static_cast<const Importbin *>(ast_);
 2205|      4|                const ImportCacheValue *value = importData(ast.location, ast.file);
 2206|      4|                scratch = makeArray({});
 2207|      4|                auto &elements = static_cast<HeapArray *>(scratch.v.h)->elements;
 2208|      4|                elements.reserve(value->content.size());
 2209|      4|                for (const auto c : value->content) {
  ------------------
  |  Branch (2209:35): [True: 0, False: 4]
  ------------------
 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|      4|            } break;
 2215|       |
 2216|  1.59M|            case AST_IN_SUPER: {
  ------------------
  |  Branch (2216:13): [True: 1.59M, False: 170M]
  ------------------
 2217|  1.59M|                const auto &ast = *static_cast<const InSuper *>(ast_);
 2218|  1.59M|                stack.newFrame(FRAME_IN_SUPER_ELEMENT, ast_);
 2219|  1.59M|                ast_ = ast.element;
 2220|  1.59M|                goto recurse;
 2221|      6|            } break;
 2222|       |
 2223|  15.1M|            case AST_INDEX: {
  ------------------
  |  Branch (2223:13): [True: 15.1M, False: 157M]
  ------------------
 2224|  15.1M|                const auto &ast = *static_cast<const Index *>(ast_);
 2225|  15.1M|                stack.newFrame(FRAME_INDEX_TARGET, ast_);
 2226|  15.1M|                ast_ = ast.target;
 2227|  15.1M|                goto recurse;
 2228|      6|            } break;
 2229|       |
 2230|  7.70M|            case AST_LOCAL: {
  ------------------
  |  Branch (2230:13): [True: 7.70M, False: 164M]
  ------------------
 2231|  7.70M|                const auto &ast = *static_cast<const Local *>(ast_);
 2232|  7.70M|                stack.newFrame(FRAME_LOCAL, ast_);
 2233|  7.70M|                Frame &f = stack.top();
 2234|       |                // First build all the thunks and bind them.
 2235|  7.70M|                HeapObject *self;
 2236|  7.70M|                unsigned offset;
 2237|  7.70M|                stack.getSelfBinding(self, offset);
 2238|  24.7M|                for (const auto &bind : ast.binds) {
  ------------------
  |  Branch (2238:39): [True: 24.7M, False: 7.70M]
  ------------------
 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|  24.7M|                    auto *th = makeHeap<HeapThunk>(bind.var, self, offset, bind.body);
 2242|  24.7M|                    f.bindings[bind.var] = th;
 2243|  24.7M|                }
 2244|       |                // Now capture the environment (including the new thunks, to make cycles).
 2245|  24.7M|                for (const auto &bind : ast.binds) {
  ------------------
  |  Branch (2245:39): [True: 24.7M, False: 7.70M]
  ------------------
 2246|  24.7M|                    auto *thunk = f.bindings[bind.var];
 2247|  24.7M|                    thunk->upValues = capture(bind.body->freeVariables);
 2248|  24.7M|                }
 2249|  7.70M|                ast_ = ast.body;
 2250|  7.70M|                goto recurse;
 2251|      6|            } break;
 2252|       |
 2253|   732k|            case AST_LITERAL_BOOLEAN: {
  ------------------
  |  Branch (2253:13): [True: 732k, False: 171M]
  ------------------
 2254|   732k|                const auto &ast = *static_cast<const LiteralBoolean *>(ast_);
 2255|   732k|                scratch = makeBoolean(ast.value);
 2256|   732k|            } break;
 2257|       |
 2258|  6.50M|            case AST_LITERAL_NUMBER: {
  ------------------
  |  Branch (2258:13): [True: 6.50M, False: 165M]
  ------------------
 2259|  6.50M|                const auto &ast = *static_cast<const LiteralNumber *>(ast_);
 2260|  6.50M|                scratch = makeNumberCheck(ast_->location, ast.value);
 2261|  6.50M|            } break;
 2262|       |
 2263|  39.9M|            case AST_LITERAL_STRING: {
  ------------------
  |  Branch (2263:13): [True: 39.9M, False: 132M]
  ------------------
 2264|  39.9M|                const auto &ast = *static_cast<const LiteralString *>(ast_);
 2265|  39.9M|                scratch = makeString(ast.value);
 2266|  39.9M|            } break;
 2267|       |
 2268|   135k|            case AST_LITERAL_NULL: {
  ------------------
  |  Branch (2268:13): [True: 135k, False: 172M]
  ------------------
 2269|   135k|                scratch = makeNull();
 2270|   135k|            } break;
 2271|       |
 2272|  1.73M|            case AST_DESUGARED_OBJECT: {
  ------------------
  |  Branch (2272:13): [True: 1.73M, False: 170M]
  ------------------
 2273|  1.73M|                const auto &ast = *static_cast<const DesugaredObject *>(ast_);
 2274|  1.73M|                if (ast.fields.empty()) {
  ------------------
  |  Branch (2274:21): [True: 1.15M, False: 588k]
  ------------------
 2275|  1.15M|                    auto env = capture(ast.freeVariables);
 2276|  1.15M|                    std::map<const Identifier *, HeapSimpleObject::Field> fields;
 2277|  1.15M|                    scratch = makeObject<HeapSimpleObject>(env, fields, ast.asserts);
 2278|  1.15M|                } else {
 2279|   588k|                    auto env = capture(ast.freeVariables);
 2280|   588k|                    stack.newFrame(FRAME_OBJECT, ast_);
 2281|   588k|                    auto fit = ast.fields.begin();
 2282|   588k|                    stack.top().fit = fit;
 2283|   588k|                    ast_ = fit->name;
 2284|   588k|                    goto recurse;
 2285|   588k|                }
 2286|  1.73M|            } break;
 2287|       |
 2288|  1.15M|            case AST_OBJECT_COMPREHENSION_SIMPLE: {
  ------------------
  |  Branch (2288:13): [True: 34, False: 172M]
  ------------------
 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.73M|            } break;
 2294|       |
 2295|  2.64M|            case AST_SELF: {
  ------------------
  |  Branch (2295:13): [True: 2.64M, False: 169M]
  ------------------
 2296|  2.64M|                scratch.t = Value::OBJECT;
 2297|  2.64M|                HeapObject *self;
 2298|  2.64M|                unsigned offset;
 2299|  2.64M|                stack.getSelfBinding(self, offset);
 2300|  2.64M|                scratch.v.h = self;
 2301|  2.64M|            } break;
 2302|       |
 2303|  1.52M|            case AST_SUPER_INDEX: {
  ------------------
  |  Branch (2303:13): [True: 1.52M, False: 170M]
  ------------------
 2304|  1.52M|                const auto &ast = *static_cast<const SuperIndex *>(ast_);
 2305|  1.52M|                stack.newFrame(FRAME_SUPER_INDEX, ast_);
 2306|  1.52M|                ast_ = ast.index;
 2307|  1.52M|                goto recurse;
 2308|  1.73M|            } break;
 2309|       |
 2310|  2.54M|            case AST_UNARY: {
  ------------------
  |  Branch (2310:13): [True: 2.54M, False: 169M]
  ------------------
 2311|  2.54M|                const auto &ast = *static_cast<const Unary *>(ast_);
 2312|  2.54M|                stack.newFrame(FRAME_UNARY, ast_);
 2313|  2.54M|                ast_ = ast.expr;
 2314|  2.54M|                goto recurse;
 2315|  1.73M|            } break;
 2316|       |
 2317|  43.0M|            case AST_VAR: {
  ------------------
  |  Branch (2317:13): [True: 43.0M, False: 129M]
  ------------------
 2318|  43.0M|                const auto &ast = *static_cast<const Var *>(ast_);
 2319|  43.0M|                auto *thunk = stack.lookUpVar(ast.id);
 2320|  43.0M|                if (thunk == nullptr) {
  ------------------
  |  Branch (2320:21): [True: 0, False: 43.0M]
  ------------------
 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|  43.0M|                if (thunk->filled) {
  ------------------
  |  Branch (2326:21): [True: 31.1M, False: 11.8M]
  ------------------
 2327|  31.1M|                    scratch = thunk->content;
 2328|  31.1M|                } else {
 2329|  11.8M|                    stack.newCall(ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 2330|  11.8M|                    ast_ = thunk->body;
 2331|  11.8M|                    goto recurse;
 2332|  11.8M|                }
 2333|  43.0M|            } break;
 2334|       |
 2335|  31.1M|            default:
  ------------------
  |  Branch (2335:13): [True: 0, False: 172M]
  ------------------
 2336|      0|                std::cerr << "INTERNAL ERROR: Unknown AST: " << ast_->type << std::endl;
 2337|      0|                std::abort();
 2338|   172M|        }
 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|   199M|        while (stack.size() > initial_stack_size) {
  ------------------
  |  Branch (2343:16): [True: 196M, False: 3.32M]
  ------------------
 2344|   196M|            Frame &f = stack.top();
 2345|   196M|            switch (f.kind) {
 2346|  15.9M|                case FRAME_APPLY_TARGET: {
  ------------------
  |  Branch (2346:17): [True: 15.9M, False: 180M]
  ------------------
 2347|  15.9M|                    const auto &ast = *static_cast<const Apply *>(f.ast);
 2348|  15.9M|                    if (scratch.t != Value::FUNCTION) {
  ------------------
  |  Branch (2348:25): [True: 9, False: 15.9M]
  ------------------
 2349|      9|                        throw makeError(ast.location,
 2350|      9|                                        "only functions can be called, got " + type_str(scratch));
 2351|      9|                    }
 2352|  15.9M|                    auto *func = static_cast<HeapClosure *>(scratch.v.h);
 2353|       |
 2354|  15.9M|                    std::set<const Identifier *> params_needed;
 2355|  27.3M|                    for (const auto &param : func->params) {
  ------------------
  |  Branch (2355:44): [True: 27.3M, False: 15.9M]
  ------------------
 2356|  27.3M|                        params_needed.insert(param.id);
 2357|  27.3M|                    }
 2358|       |
 2359|       |                    // Create thunks for arguments.
 2360|  15.9M|                    std::vector<HeapThunk *> positional_args;
 2361|  15.9M|                    BindingFrame args;
 2362|  15.9M|                    bool got_named = false;
 2363|  43.2M|                    for (std::size_t i = 0; i < ast.args.size(); ++i) {
  ------------------
  |  Branch (2363:45): [True: 27.3M, False: 15.9M]
  ------------------
 2364|  27.3M|                        const auto &arg = ast.args[i];
 2365|       |
 2366|  27.3M|                        const Identifier *name;
 2367|  27.3M|                        if (arg.id != nullptr) {
  ------------------
  |  Branch (2367:29): [True: 0, False: 27.3M]
  ------------------
 2368|      0|                            got_named = true;
 2369|      0|                            name = arg.id;
 2370|  27.3M|                        } else {
 2371|  27.3M|                            if (got_named) {
  ------------------
  |  Branch (2371:33): [True: 0, False: 27.3M]
  ------------------
 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|  27.3M|                            if (i >= func->params.size()) {
  ------------------
  |  Branch (2377:33): [True: 0, False: 27.3M]
  ------------------
 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|  27.3M|                            name = func->params[i].id;
 2384|  27.3M|                        }
 2385|       |                        // Special case for builtin functions -- leave identifier blank for
 2386|       |                        // them in the thunk.  This removes the thunk frame from the stacktrace.
 2387|  27.3M|                        const Identifier *name_ = func->isBuiltin() ? nullptr : name;
  ------------------
  |  Branch (2387:51): [True: 18.1M, False: 9.23M]
  ------------------
 2388|  27.3M|                        HeapObject *self;
 2389|  27.3M|                        unsigned offset;
 2390|  27.3M|                        stack.getSelfBinding(self, offset);
 2391|  27.3M|                        auto *thunk = makeHeap<HeapThunk>(name_, self, offset, arg.expr);
 2392|  27.3M|                        thunk->upValues = capture(arg.expr->freeVariables);
 2393|       |                        // While making the thunks, keep them in a frame to avoid premature garbage
 2394|       |                        // collection.
 2395|  27.3M|                        f.thunks.push_back(thunk);
 2396|  27.3M|                        if (args.find(name) != args.end()) {
  ------------------
  |  Branch (2396:29): [True: 0, False: 27.3M]
  ------------------
 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|  27.3M|                        args[name] = thunk;
 2402|  27.3M|                        if (params_needed.find(name) == params_needed.end()) {
  ------------------
  |  Branch (2402:29): [True: 0, False: 27.3M]
  ------------------
 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|  27.3M|                    }
 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|  15.9M|                    std::vector<HeapThunk *> def_arg_thunks;
 2416|  27.3M|                    for (const auto &param : func->params) {
  ------------------
  |  Branch (2416:44): [True: 27.3M, False: 15.9M]
  ------------------
 2417|  27.3M|                        if (args.find(param.id) != args.end())
  ------------------
  |  Branch (2417:29): [True: 27.3M, False: 268]
  ------------------
 2418|  27.3M|                            continue;
 2419|    268|                        if (param.def == nullptr) {
  ------------------
  |  Branch (2419:29): [True: 28, False: 240]
  ------------------
 2420|     28|                            std::stringstream ss;
 2421|     28|                            ss << "function parameter " << encode_utf8(param.id->name)
 2422|     28|                               << " not bound in call.";
 2423|     28|                            throw makeError(ast.location, ss.str());
 2424|     28|                        }
 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|    240|                        const Identifier *name_ = func->isBuiltin() ? nullptr : param.id;
  ------------------
  |  Branch (2428:51): [True: 0, False: 240]
  ------------------
 2429|    240|                        auto *thunk =
 2430|    240|                            makeHeap<HeapThunk>(name_, func->self, func->offset, param.def);
 2431|    240|                        f.thunks.push_back(thunk);
 2432|    240|                        def_arg_thunks.push_back(thunk);
 2433|    240|                        args[param.id] = thunk;
 2434|    240|                    }
 2435|       |
 2436|  15.9M|                    BindingFrame up_values = func->upValues;
 2437|  15.9M|                    up_values.insert(args.begin(), args.end());
 2438|       |
 2439|       |                    // Fill in upvalues
 2440|  15.9M|                    for (HeapThunk *thunk : def_arg_thunks) {
  ------------------
  |  Branch (2440:43): [True: 13, False: 15.9M]
  ------------------
 2441|     13|                        thunk->upValues = up_values;
 2442|     13|                    }
 2443|       |
 2444|       |                    // Cache these, because pop will invalidate them.
 2445|  15.9M|                    std::vector<HeapThunk *> thunks_copy = f.thunks;
 2446|       |
 2447|  15.9M|                    const AST *f_ast = f.ast;
 2448|  15.9M|                    stack.pop();
 2449|       |
 2450|  15.9M|                    if (func->isBuiltin()) {
  ------------------
  |  Branch (2450:25): [True: 11.4M, False: 4.45M]
  ------------------
 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|  11.4M|                        stack.newFrame(FRAME_BUILTIN_FORCE_THUNKS, f_ast);
 2455|  11.4M|                        assert(func->upValues.empty());
  ------------------
  |  Branch (2455:25): [True: 11.4M, False: 0]
  ------------------
 2456|  11.4M|                        stack.top().bindings = up_values;
 2457|  11.4M|                        stack.top().thunks = thunks_copy;
 2458|  11.4M|                        stack.top().val = scratch;
 2459|  11.4M|                        goto replaceframe;
 2460|  11.4M|                    } else {
 2461|       |                        // User defined function.
 2462|  4.45M|                        stack.newCall(ast.location, func, func->self, func->offset, up_values);
 2463|  4.45M|                        if (ast.tailstrict) {
  ------------------
  |  Branch (2463:29): [True: 2.13M, False: 2.31M]
  ------------------
 2464|  2.13M|                            stack.top().tailCall = true;
 2465|  2.13M|                            if (thunks_copy.size() == 0) {
  ------------------
  |  Branch (2465:33): [True: 0, False: 2.13M]
  ------------------
 2466|       |                                // No need to force thunks, proceed straight to body.
 2467|      0|                                ast_ = func->body;
 2468|      0|                                goto recurse;
 2469|  2.13M|                            } else {
 2470|       |                                // The check for args.size() > 0
 2471|  2.13M|                                stack.top().thunks = thunks_copy;
 2472|  2.13M|                                stack.top().val = scratch;
 2473|  2.13M|                                goto replaceframe;
 2474|  2.13M|                            }
 2475|  2.31M|                        } else {
 2476|  2.31M|                            ast_ = func->body;
 2477|  2.31M|                            goto recurse;
 2478|  2.31M|                        }
 2479|  4.45M|                    }
 2480|  15.9M|                } break;
 2481|       |
 2482|  8.24M|                case FRAME_BINARY_LEFT: {
  ------------------
  |  Branch (2482:17): [True: 8.24M, False: 188M]
  ------------------
 2483|  8.24M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 2484|  8.24M|                    const Value &lhs = scratch;
 2485|  8.24M|                    if (lhs.t == Value::BOOLEAN) {
  ------------------
  |  Branch (2485:25): [True: 269k, False: 7.97M]
  ------------------
 2486|       |                        // Handle short-cut semantics
 2487|   269k|                        switch (ast.op) {
 2488|  89.7k|                            case BOP_AND: {
  ------------------
  |  Branch (2488:29): [True: 89.7k, False: 180k]
  ------------------
 2489|  89.7k|                                if (!lhs.v.b) {
  ------------------
  |  Branch (2489:37): [True: 24.8k, False: 64.8k]
  ------------------
 2490|  24.8k|                                    scratch = makeBoolean(false);
 2491|  24.8k|                                    goto popframe;
 2492|  24.8k|                                }
 2493|  89.7k|                            } break;
 2494|       |
 2495|   179k|                            case BOP_OR: {
  ------------------
  |  Branch (2495:29): [True: 179k, False: 90.5k]
  ------------------
 2496|   179k|                                if (lhs.v.b) {
  ------------------
  |  Branch (2496:37): [True: 3.55k, False: 175k]
  ------------------
 2497|  3.55k|                                    scratch = makeBoolean(true);
 2498|  3.55k|                                    goto popframe;
 2499|  3.55k|                                }
 2500|   179k|                            } break;
 2501|       |
 2502|   175k|                            default:;
  ------------------
  |  Branch (2502:29): [True: 799, False: 269k]
  ------------------
 2503|   269k|                        }
 2504|   269k|                    }
 2505|  8.21M|                    stack.top().kind = FRAME_BINARY_RIGHT;
 2506|  8.21M|                    stack.top().val = lhs;
 2507|  8.21M|                    ast_ = ast.right;
 2508|  8.21M|                    goto recurse;
 2509|  8.24M|                } break;
 2510|       |
 2511|  8.21M|                case FRAME_BINARY_RIGHT: {
  ------------------
  |  Branch (2511:17): [True: 8.21M, False: 188M]
  ------------------
 2512|  8.21M|                    stack.top().val2 = scratch;
 2513|  8.21M|                    stack.top().kind = FRAME_BINARY_OP;
 2514|  8.21M|                }
 2515|  8.21M|                [[fallthrough]];
 2516|  8.21M|                case FRAME_BINARY_OP: {
  ------------------
  |  Branch (2516:17): [True: 227, False: 196M]
  ------------------
 2517|  8.21M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 2518|  8.21M|                    const Value &lhs = stack.top().val;
 2519|  8.21M|                    const Value &rhs = stack.top().val2;
 2520|       |
 2521|       |                    // Handle cases where the LHS and RHS are not the same type.
 2522|  8.21M|                    if (lhs.t == Value::STRING || rhs.t == Value::STRING) {
  ------------------
  |  Branch (2522:25): [True: 2.29M, False: 5.91M]
  |  Branch (2522:51): [True: 29.6k, False: 5.88M]
  ------------------
 2523|  2.32M|                        if (ast.op == BOP_PLUS) {
  ------------------
  |  Branch (2523:29): [True: 2.29M, False: 34.0k]
  ------------------
 2524|       |                            // Handle co-ercions for string processing.
 2525|  2.29M|                            stack.top().kind = FRAME_STRING_CONCAT;
 2526|  2.29M|                            stack.top().val2 = rhs;
 2527|  2.29M|                            goto replaceframe;
 2528|  2.29M|                        }
 2529|  2.32M|                    }
 2530|  5.91M|                    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: 5.91M]
  ------------------
 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: 5.91M]
  ------------------
 2538|      0|                            std::cerr << "INTERNAL ERROR: Notequals not desugared" << std::endl;
 2539|      0|                            abort();
 2540|       |
 2541|       |                        // e in e
 2542|  1.10k|                        case BOP_IN: {
  ------------------
  |  Branch (2542:25): [True: 1.10k, False: 5.91M]
  ------------------
 2543|  1.10k|                            if (lhs.t != Value::STRING) {
  ------------------
  |  Branch (2543:33): [True: 24, False: 1.08k]
  ------------------
 2544|     24|                                throw makeError(ast.location,
 2545|     24|                                                "the left hand side of the 'in' operator should be "
 2546|     24|                                                "a string,  got " +
 2547|     24|                                                    type_str(lhs));
 2548|     24|                            }
 2549|  1.08k|                            auto *field = static_cast<HeapString *>(lhs.v.h);
 2550|  1.08k|                            switch (rhs.t) {
 2551|  1.08k|                                case Value::OBJECT: {
  ------------------
  |  Branch (2551:33): [True: 1.08k, False: 2]
  ------------------
 2552|  1.08k|                                    auto *obj = static_cast<HeapObject *>(rhs.v.h);
 2553|  1.08k|                                    auto *fid = alloc->makeIdentifier(field->value);
 2554|  1.08k|                                    unsigned unused_found_at = 0;
 2555|  1.08k|                                    bool in = findObject(fid, obj, 0, unused_found_at);
 2556|  1.08k|                                    scratch = makeBoolean(in);
 2557|  1.08k|                                } break;
 2558|       |
 2559|      2|                                default:
  ------------------
  |  Branch (2559:33): [True: 2, False: 1.08k]
  ------------------
 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|  1.08k|                            }
 2566|  1.08k|                            goto popframe;
 2567|  1.08k|                        }
 2568|       |
 2569|  5.91M|                        default:;
  ------------------
  |  Branch (2569:25): [True: 5.91M, False: 1.10k]
  ------------------
 2570|  5.91M|                    }
 2571|       |                    // Everything else requires matching types.
 2572|  5.91M|                    if (lhs.t != rhs.t) {
  ------------------
  |  Branch (2572:25): [True: 103, False: 5.91M]
  ------------------
 2573|    103|                        throw makeError(ast.location,
 2574|    103|                                        "binary operator " + bop_string(ast.op) +
 2575|    103|                                            " requires "
 2576|    103|                                            "matching types, got " +
 2577|    103|                                            type_str(lhs) + " and " + type_str(rhs) + ".");
 2578|    103|                    }
 2579|  5.91M|                    switch (lhs.t) {
  ------------------
  |  Branch (2579:29): [True: 5.91M, False: 0]
  ------------------
 2580|   310k|                        case Value::ARRAY:
  ------------------
  |  Branch (2580:25): [True: 310k, False: 5.60M]
  ------------------
 2581|   310k|                            if (ast.op == BOP_PLUS) {
  ------------------
  |  Branch (2581:33): [True: 289k, False: 21.1k]
  ------------------
 2582|   289k|                                auto *arr_l = static_cast<HeapArray *>(lhs.v.h);
 2583|   289k|                                auto *arr_r = static_cast<HeapArray *>(rhs.v.h);
 2584|   289k|                                std::vector<HeapThunk *> elements;
 2585|   289k|                                for (auto *el : arr_l->elements)
  ------------------
  |  Branch (2585:47): [True: 24.4M, False: 289k]
  ------------------
 2586|  24.4M|                                    elements.push_back(el);
 2587|   289k|                                for (auto *el : arr_r->elements)
  ------------------
  |  Branch (2587:47): [True: 978k, False: 289k]
  ------------------
 2588|   978k|                                    elements.push_back(el);
 2589|   289k|                                scratch = makeArray(elements);
 2590|   289k|                            } else if (ast.op == BOP_LESS || ast.op == BOP_LESS_EQ || ast.op == BOP_GREATER || ast.op == BOP_GREATER_EQ) {
  ------------------
  |  Branch (2590:40): [True: 7.93k, False: 13.1k]
  |  Branch (2590:62): [True: 2.18k, False: 10.9k]
  |  Branch (2590:87): [True: 336, False: 10.6k]
  |  Branch (2590:112): [True: 10.6k, False: 8]
  ------------------
 2591|  21.0k|                                HeapThunk *func;
 2592|  21.0k|                                switch(ast.op) {
 2593|  7.93k|                                case BOP_LESS:
  ------------------
  |  Branch (2593:33): [True: 7.93k, False: 13.1k]
  ------------------
 2594|  7.93k|                                    func = sourceVals["__array_less"];
 2595|  7.93k|                                    break;
 2596|  2.18k|                                case BOP_LESS_EQ:
  ------------------
  |  Branch (2596:33): [True: 2.18k, False: 18.9k]
  ------------------
 2597|  2.18k|                                    func = sourceVals["__array_less_or_equal"];
 2598|  2.18k|                                    break;
 2599|    336|                                case BOP_GREATER:
  ------------------
  |  Branch (2599:33): [True: 336, False: 20.7k]
  ------------------
 2600|    336|                                    func = sourceVals["__array_greater"];
 2601|    336|                                    break;
 2602|  10.6k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2602:33): [True: 10.6k, False: 10.4k]
  ------------------
 2603|  10.6k|                                    func = sourceVals["__array_greater_or_equal"];
 2604|  10.6k|                                    break;
 2605|      0|                                default:
  ------------------
  |  Branch (2605:33): [True: 0, False: 21.0k]
  ------------------
 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|  21.0k|                                }
 2608|  21.0k|                                if (!func->filled) {
  ------------------
  |  Branch (2608:37): [True: 227, False: 20.8k]
  ------------------
 2609|    227|                                    stack.newCall(ast.location, func, func->self, func->offset, func->upValues);
 2610|    227|                                    ast_ = func->body;
 2611|    227|                                    goto recurse;
 2612|    227|                                }
 2613|  20.8k|                                auto *lhs_th = makeHeap<HeapThunk>(idInternal, f.self, f.offset, ast.left);
 2614|  20.8k|                                lhs_th->fill(lhs);
 2615|  20.8k|                                f.thunks.push_back(lhs_th);
 2616|  20.8k|                                auto *rhs_th = makeHeap<HeapThunk>(idInternal, f.self, f.offset, ast.right);
 2617|  20.8k|                                rhs_th->fill(rhs);
 2618|  20.8k|                                f.thunks.push_back(rhs_th);
 2619|  20.8k|                                const AST *orig_ast = ast_;
 2620|  20.8k|                                stack.pop();
 2621|  20.8k|                                ast_ = callSourceVal(orig_ast, func, {lhs_th, rhs_th});
 2622|  20.8k|                                goto recurse;
 2623|  21.0k|                            } else {
 2624|      8|                                throw makeError(ast.location,
 2625|      8|                                                "binary operator " + bop_string(ast.op) +
 2626|      8|                                                    " does not operate on arrays.");
 2627|      8|                            }
 2628|   289k|                            break;
 2629|       |
 2630|   289k|                        case Value::BOOLEAN:
  ------------------
  |  Branch (2630:25): [True: 240k, False: 5.67M]
  ------------------
 2631|   240k|                            switch (ast.op) {
 2632|  64.8k|                                case BOP_AND: scratch = makeBoolean(lhs.v.b && rhs.v.b); break;
  ------------------
  |  Branch (2632:33): [True: 64.8k, False: 175k]
  |  Branch (2632:69): [True: 64.8k, False: 0]
  |  Branch (2632:80): [True: 51.4k, False: 13.4k]
  ------------------
 2633|       |
 2634|   175k|                                case BOP_OR: scratch = makeBoolean(lhs.v.b || rhs.v.b); break;
  ------------------
  |  Branch (2634:33): [True: 175k, False: 64.8k]
  |  Branch (2634:68): [True: 0, False: 175k]
  |  Branch (2634:79): [True: 2.76k, False: 173k]
  ------------------
 2635|       |
 2636|     75|                                default:
  ------------------
  |  Branch (2636:33): [True: 75, False: 240k]
  ------------------
 2637|     75|                                    throw makeError(ast.location,
 2638|     75|                                                    "binary operator " + bop_string(ast.op) +
 2639|     75|                                                        " does not operate on booleans.");
 2640|   240k|                            }
 2641|   240k|                            break;
 2642|       |
 2643|  4.06M|                        case Value::NUMBER:
  ------------------
  |  Branch (2643:25): [True: 4.06M, False: 1.85M]
  ------------------
 2644|  4.06M|                            switch (ast.op) {
 2645|   411k|                                case BOP_PLUS:
  ------------------
  |  Branch (2645:33): [True: 411k, False: 3.65M]
  ------------------
 2646|   411k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d + rhs.v.d);
 2647|   411k|                                    break;
 2648|       |
 2649|  1.41M|                                case BOP_MINUS:
  ------------------
  |  Branch (2649:33): [True: 1.41M, False: 2.65M]
  ------------------
 2650|  1.41M|                                    scratch = makeNumberCheck(ast.location, lhs.v.d - rhs.v.d);
 2651|  1.41M|                                    break;
 2652|       |
 2653|  36.6k|                                case BOP_MULT:
  ------------------
  |  Branch (2653:33): [True: 36.6k, False: 4.02M]
  ------------------
 2654|  36.6k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d * rhs.v.d);
 2655|  36.6k|                                    break;
 2656|       |
 2657|  30.2k|                                case BOP_DIV:
  ------------------
  |  Branch (2657:33): [True: 30.2k, False: 4.03M]
  ------------------
 2658|  30.2k|                                    if (rhs.v.d == 0)
  ------------------
  |  Branch (2658:41): [True: 3, False: 30.2k]
  ------------------
 2659|      3|                                        throw makeError(ast.location, "division by zero.");
 2660|  30.2k|                                    scratch = makeNumberCheck(ast.location, lhs.v.d / rhs.v.d);
 2661|  30.2k|                                    break;
 2662|       |
 2663|       |                                    // No need to check doubles made from longs
 2664|       |
 2665|  3.11k|                                case BOP_SHIFT_L: {
  ------------------
  |  Branch (2665:33): [True: 3.11k, False: 4.06M]
  ------------------
 2666|  3.11k|                                    if (rhs.v.d < 0)
  ------------------
  |  Branch (2666:41): [True: 1, False: 3.11k]
  ------------------
 2667|      1|                                        throw makeError(ast.location, "shift by negative exponent.");
 2668|       |
 2669|  3.11k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2670|  3.11k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2671|  3.11k|                                    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|  3.11k|                                    if (long_r >= 1 && abs(long_l) >= (1LL << (63 - long_r))) {
  ------------------
  |  Branch (2675:41): [True: 2.76k, False: 345]
  |  Branch (2675:56): [True: 36, False: 2.72k]
  ------------------
 2676|     36|                                        throw makeError(ast.location,
 2677|     36|                                            "numeric value outside safe integer range for bitwise operation.");
 2678|     36|                                    }
 2679|       |
 2680|       |                                    // Left-shift of a negative number is undefined until C++20.
 2681|       |                                    // Perform the shift on unsigned int to avoid that.
 2682|  3.07k|                                    scratch = makeNumber(static_cast<int64_t>(static_cast<uint64_t>(long_l) << long_r));
 2683|  3.07k|                                } break;
 2684|       |
 2685|  1.02k|                                case BOP_SHIFT_R: {
  ------------------
  |  Branch (2685:33): [True: 1.02k, False: 4.06M]
  ------------------
 2686|  1.02k|                                    if (rhs.v.d < 0)
  ------------------
  |  Branch (2686:41): [True: 2, False: 1.01k]
  ------------------
 2687|      2|                                        throw makeError(ast.location, "shift by negative exponent.");
 2688|       |
 2689|  1.01k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2690|  1.01k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2691|  1.01k|                                    long_r = long_r % 64;
 2692|  1.01k|                                    scratch = makeNumber(long_l >> long_r);
 2693|  1.01k|                                } break;
 2694|       |
 2695|  6.76k|                                case BOP_BITWISE_AND: {
  ------------------
  |  Branch (2695:33): [True: 6.76k, False: 4.05M]
  ------------------
 2696|  6.76k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2697|  6.76k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2698|  6.76k|                                    scratch = makeNumber(long_l & long_r);
 2699|  6.76k|                                } break;
 2700|       |
 2701|  5.20k|                                case BOP_BITWISE_XOR: {
  ------------------
  |  Branch (2701:33): [True: 5.20k, False: 4.06M]
  ------------------
 2702|  5.20k|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2703|  5.20k|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2704|  5.20k|                                    scratch = makeNumber(long_l ^ long_r);
 2705|  5.20k|                                } break;
 2706|       |
 2707|    533|                                case BOP_BITWISE_OR: {
  ------------------
  |  Branch (2707:33): [True: 533, False: 4.06M]
  ------------------
 2708|    533|                                    int64_t long_l = safeDoubleToInt64(lhs.v.d, ast.location);
 2709|    533|                                    int64_t long_r = safeDoubleToInt64(rhs.v.d, ast.location);
 2710|    533|                                    scratch = makeNumber(long_l | long_r);
 2711|    533|                                } break;
 2712|       |
 2713|  1.38M|                                case BOP_LESS_EQ: scratch = makeBoolean(lhs.v.d <= rhs.v.d); break;
  ------------------
  |  Branch (2713:33): [True: 1.38M, False: 2.68M]
  ------------------
 2714|       |
 2715|   441k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2715:33): [True: 441k, False: 3.62M]
  ------------------
 2716|   441k|                                    scratch = makeBoolean(lhs.v.d >= rhs.v.d);
 2717|   441k|                                    break;
 2718|       |
 2719|   289k|                                case BOP_LESS: scratch = makeBoolean(lhs.v.d < rhs.v.d); break;
  ------------------
  |  Branch (2719:33): [True: 289k, False: 3.77M]
  ------------------
 2720|       |
 2721|  40.3k|                                case BOP_GREATER: scratch = makeBoolean(lhs.v.d > rhs.v.d); break;
  ------------------
  |  Branch (2721:33): [True: 40.3k, False: 4.02M]
  ------------------
 2722|       |
 2723|      5|                                default:
  ------------------
  |  Branch (2723:33): [True: 5, False: 4.06M]
  ------------------
 2724|      5|                                    throw makeError(ast.location,
 2725|      5|                                                    "binary operator " + bop_string(ast.op) +
 2726|      5|                                                        " does not operate on numbers.");
 2727|  4.06M|                            }
 2728|  4.06M|                            break;
 2729|       |
 2730|  4.06M|                        case Value::FUNCTION:
  ------------------
  |  Branch (2730:25): [True: 0, False: 5.91M]
  ------------------
 2731|      0|                            throw makeError(ast.location,
 2732|      0|                                            "binary operator " + bop_string(ast.op) +
 2733|      0|                                                " does not operate on functions.");
 2734|       |
 2735|      4|                        case Value::NULL_TYPE:
  ------------------
  |  Branch (2735:25): [True: 4, False: 5.91M]
  ------------------
 2736|      4|                            throw makeError(ast.location,
 2737|      4|                                            "binary operator " + bop_string(ast.op) +
 2738|      4|                                                " does not operate on null.");
 2739|       |
 2740|  1.26M|                        case Value::OBJECT: {
  ------------------
  |  Branch (2740:25): [True: 1.26M, False: 4.64M]
  ------------------
 2741|  1.26M|                            if (ast.op != BOP_PLUS) {
  ------------------
  |  Branch (2741:33): [True: 8, False: 1.26M]
  ------------------
 2742|      8|                                throw makeError(ast.location,
 2743|      8|                                                "binary operator " + bop_string(ast.op) +
 2744|      8|                                                    " does not operate on objects.");
 2745|      8|                            }
 2746|  1.26M|                            auto *lhs_obj = static_cast<HeapObject *>(lhs.v.h);
 2747|  1.26M|                            auto *rhs_obj = static_cast<HeapObject *>(rhs.v.h);
 2748|  1.26M|                            scratch = makeObject<HeapExtendedObject>(lhs_obj, rhs_obj);
 2749|  1.26M|                        } break;
 2750|       |
 2751|  32.9k|                        case Value::STRING: {
  ------------------
  |  Branch (2751:25): [True: 32.9k, False: 5.88M]
  ------------------
 2752|  32.9k|                            const UString &lhs_str = static_cast<HeapString *>(lhs.v.h)->value;
 2753|  32.9k|                            const UString &rhs_str = static_cast<HeapString *>(rhs.v.h)->value;
 2754|  32.9k|                            switch (ast.op) {
 2755|      0|                                case BOP_PLUS: scratch = makeString(lhs_str + rhs_str); break;
  ------------------
  |  Branch (2755:33): [True: 0, False: 32.9k]
  ------------------
 2756|       |
 2757|  4.41k|                                case BOP_LESS_EQ: scratch = makeBoolean(lhs_str <= rhs_str); break;
  ------------------
  |  Branch (2757:33): [True: 4.41k, False: 28.5k]
  ------------------
 2758|       |
 2759|  19.4k|                                case BOP_GREATER_EQ:
  ------------------
  |  Branch (2759:33): [True: 19.4k, False: 13.4k]
  ------------------
 2760|  19.4k|                                    scratch = makeBoolean(lhs_str >= rhs_str);
 2761|  19.4k|                                    break;
 2762|       |
 2763|  5.03k|                                case BOP_LESS: scratch = makeBoolean(lhs_str < rhs_str); break;
  ------------------
  |  Branch (2763:33): [True: 5.03k, False: 27.8k]
  ------------------
 2764|       |
 2765|  4.00k|                                case BOP_GREATER: scratch = makeBoolean(lhs_str > rhs_str); break;
  ------------------
  |  Branch (2765:33): [True: 4.00k, False: 28.9k]
  ------------------
 2766|       |
 2767|     18|                                default:
  ------------------
  |  Branch (2767:33): [True: 18, False: 32.9k]
  ------------------
 2768|     18|                                    throw makeError(ast.location,
 2769|     18|                                                    "binary operator " + bop_string(ast.op) +
 2770|     18|                                                        " does not operate on strings.");
 2771|  32.9k|                            }
 2772|  32.9k|                        } break;
 2773|  5.91M|                    }
 2774|  5.91M|                } break;
 2775|       |
 2776|  5.89M|                case FRAME_BUILTIN_FILTER: {
  ------------------
  |  Branch (2776:17): [True: 0, False: 196M]
  ------------------
 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|  29.5M|                case FRAME_BUILTIN_FORCE_THUNKS: {
  ------------------
  |  Branch (2801:17): [True: 29.5M, False: 166M]
  ------------------
 2802|  29.5M|                    const auto &location = f.location;
 2803|  29.5M|                    auto *func = static_cast<HeapClosure *>(f.val.v.h);
 2804|  29.5M|                    if (f.elementId == f.thunks.size()) {
  ------------------
  |  Branch (2804:25): [True: 11.4M, False: 18.1M]
  ------------------
 2805|       |                        // All thunks forced, now the builtin implementations.
 2806|  11.4M|                        const std::string &builtin_name = func->builtinName;
 2807|  11.4M|                        std::vector<Value> args;
 2808|  18.1M|                        for (const auto &p : func->params) {
  ------------------
  |  Branch (2808:44): [True: 18.1M, False: 11.4M]
  ------------------
 2809|  18.1M|                            const auto it = f.bindings.find(p.id);
 2810|  18.1M|                            if (it != f.bindings.end()) {
  ------------------
  |  Branch (2810:33): [True: 18.1M, False: 0]
  ------------------
 2811|  18.1M|                                assert(it->second->filled);
  ------------------
  |  Branch (2811:33): [True: 18.1M, False: 0]
  ------------------
 2812|  18.1M|                                args.push_back(it->second->content);
 2813|  18.1M|                            } 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|  18.1M|                        }
 2820|       |
 2821|  11.4M|                        BuiltinMap::const_iterator bit = builtins.find(builtin_name);
 2822|  11.4M|                        if (bit != builtins.end()) {
  ------------------
  |  Branch (2822:29): [True: 11.4M, False: 0]
  ------------------
 2823|  11.4M|                            const AST *new_ast = (this->*bit->second)(location, args);
 2824|  11.4M|                            if (new_ast != nullptr) {
  ------------------
  |  Branch (2824:33): [True: 0, False: 11.4M]
  ------------------
 2825|      0|                                ast_ = new_ast;
 2826|      0|                                goto recurse;
 2827|      0|                            }
 2828|  11.4M|                            break;
 2829|  11.4M|                        }
 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|  18.1M|                    } else {
 2889|       |                        // Not all arguments forced yet.
 2890|  18.1M|                        HeapThunk *th = f.thunks[f.elementId++];
 2891|  18.1M|                        if (!th->filled) {
  ------------------
  |  Branch (2891:29): [True: 18.1M, False: 0]
  ------------------
 2892|  18.1M|                            stack.newCall(location, th, th->self, th->offset, th->upValues);
 2893|  18.1M|                            ast_ = th->body;
 2894|  18.1M|                            goto recurse;
 2895|  18.1M|                        } else {
 2896|       |                            // Otherwise loop back around to force the next thunk.
 2897|      0|                            goto replaceframe;
 2898|      0|                        }
 2899|  18.1M|                    }
 2900|  29.5M|                } break;
 2901|       |
 2902|  61.9M|                case FRAME_CALL: {
  ------------------
  |  Branch (2902:17): [True: 61.9M, False: 134M]
  ------------------
 2903|  61.9M|                    if (auto *thunk = dynamic_cast<HeapThunk *>(f.context)) {
  ------------------
  |  Branch (2903:31): [True: 34.7M, False: 27.1M]
  ------------------
 2904|       |                        // If we called a thunk, cache result.
 2905|  34.7M|                        thunk->fill(scratch);
 2906|  34.7M|                    } else if (auto *closure = dynamic_cast<HeapClosure *>(f.context)) {
  ------------------
  |  Branch (2906:38): [True: 11.0M, False: 16.1M]
  ------------------
 2907|  11.0M|                        if (f.elementId < f.thunks.size()) {
  ------------------
  |  Branch (2907:29): [True: 4.76M, False: 6.23M]
  ------------------
 2908|       |                            // If tailstrict, force thunks
 2909|  4.76M|                            HeapThunk *th = f.thunks[f.elementId++];
 2910|  4.76M|                            if (!th->filled) {
  ------------------
  |  Branch (2910:33): [True: 4.76M, False: 0]
  ------------------
 2911|  4.76M|                                stack.newCall(f.location, th, th->self, th->offset, th->upValues);
 2912|  4.76M|                                ast_ = th->body;
 2913|  4.76M|                                goto recurse;
 2914|  4.76M|                            }
 2915|  6.23M|                        } else if (f.thunks.size() == 0) {
  ------------------
  |  Branch (2915:36): [True: 4.10M, False: 2.13M]
  ------------------
 2916|       |                            // Body has now been executed
 2917|  4.10M|                        } else {
 2918|       |                            // Execute the body
 2919|  2.13M|                            f.thunks.clear();
 2920|  2.13M|                            f.elementId = 0;
 2921|  2.13M|                            ast_ = closure->body;
 2922|  2.13M|                            goto recurse;
 2923|  2.13M|                        }
 2924|  11.0M|                    }
 2925|       |                    // Result of call is in scratch, just pop.
 2926|  61.9M|                } break;
 2927|       |
 2928|  55.0M|                case FRAME_ERROR: {
  ------------------
  |  Branch (2928:17): [True: 3.26k, False: 196M]
  ------------------
 2929|  3.26k|                    const auto &ast = *static_cast<const Error *>(f.ast);
 2930|  3.26k|                    UString msg;
 2931|  3.26k|                    if (scratch.t == Value::STRING) {
  ------------------
  |  Branch (2931:25): [True: 410, False: 2.85k]
  ------------------
 2932|    410|                        msg = static_cast<HeapString *>(scratch.v.h)->value;
 2933|  2.85k|                    } else {
 2934|  2.85k|                        msg = toString(ast.location);
 2935|  2.85k|                    }
 2936|  3.26k|                    throw makeError(ast.location, encode_utf8(msg));
 2937|  61.9M|                } break;
 2938|       |
 2939|  10.1M|                case FRAME_IF: {
  ------------------
  |  Branch (2939:17): [True: 10.1M, False: 186M]
  ------------------
 2940|  10.1M|                    const auto &ast = *static_cast<const Conditional *>(f.ast);
 2941|  10.1M|                    if (scratch.t != Value::BOOLEAN) {
  ------------------
  |  Branch (2941:25): [True: 25, False: 10.1M]
  ------------------
 2942|     25|                        throw makeError(
 2943|     25|                            ast.location,
 2944|     25|                            "condition must be boolean, got " + type_str(scratch) + ".");
 2945|     25|                    }
 2946|  10.1M|                    ast_ = scratch.v.b ? ast.branchTrue : ast.branchFalse;
  ------------------
  |  Branch (2946:28): [True: 2.73M, False: 7.43M]
  ------------------
 2947|  10.1M|                    stack.pop();
 2948|  10.1M|                    goto recurse;
 2949|  10.1M|                } break;
 2950|       |
 2951|  1.52M|                case FRAME_SUPER_INDEX: {
  ------------------
  |  Branch (2951:17): [True: 1.52M, False: 195M]
  ------------------
 2952|  1.52M|                    const auto &ast = *static_cast<const SuperIndex *>(f.ast);
 2953|  1.52M|                    HeapObject *self;
 2954|  1.52M|                    unsigned offset;
 2955|  1.52M|                    stack.getSelfBinding(self, offset);
 2956|  1.52M|                    offset++;
 2957|  1.52M|                    if (offset >= countLeaves(self)) {
  ------------------
  |  Branch (2957:25): [True: 1, False: 1.52M]
  ------------------
 2958|      1|                        throw makeError(ast.location,
 2959|      1|                                        "attempt to use super when there is no super class.");
 2960|      1|                    }
 2961|  1.52M|                    if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2961:25): [True: 0, False: 1.52M]
  ------------------
 2962|      0|                        throw makeError(
 2963|      0|                            ast.location,
 2964|      0|                            "super index must be string, got " + type_str(scratch) + ".");
 2965|      0|                    }
 2966|       |
 2967|  1.52M|                    const UString &index_name = static_cast<HeapString *>(scratch.v.h)->value;
 2968|  1.52M|                    auto *fid = alloc->makeIdentifier(index_name);
 2969|  1.52M|                    stack.pop();
 2970|  1.52M|                    ast_ = objectIndex(ast.location, self, fid, offset);
 2971|  1.52M|                    goto recurse;
 2972|  1.52M|                } break;
 2973|       |
 2974|  1.59M|                case FRAME_IN_SUPER_ELEMENT: {
  ------------------
  |  Branch (2974:17): [True: 1.59M, False: 194M]
  ------------------
 2975|  1.59M|                    const auto &ast = *static_cast<const InSuper *>(f.ast);
 2976|  1.59M|                    HeapObject *self;
 2977|  1.59M|                    unsigned offset;
 2978|  1.59M|                    stack.getSelfBinding(self, offset);
 2979|  1.59M|                    offset++;
 2980|  1.59M|                    if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (2980:25): [True: 1, False: 1.59M]
  ------------------
 2981|      1|                        throw makeError(ast.location,
 2982|      1|                                        "left hand side of e in super must be string, got " +
 2983|      1|                                            type_str(scratch) + ".");
 2984|      1|                    }
 2985|  1.59M|                    if (offset >= countLeaves(self)) {
  ------------------
  |  Branch (2985:25): [True: 46.8k, False: 1.54M]
  ------------------
 2986|       |                        // There is no super object.
 2987|  46.8k|                        scratch = makeBoolean(false);
 2988|  1.54M|                    } else {
 2989|  1.54M|                        const UString &element_name = static_cast<HeapString *>(scratch.v.h)->value;
 2990|  1.54M|                        auto *fid = alloc->makeIdentifier(element_name);
 2991|  1.54M|                        unsigned unused_found_at = 0;
 2992|  1.54M|                        bool in = findObject(fid, self, offset, unused_found_at);
 2993|  1.54M|                        scratch = makeBoolean(in);
 2994|  1.54M|                    }
 2995|  1.59M|                } break;
 2996|       |
 2997|  15.1M|                case FRAME_INDEX_INDEX: {
  ------------------
  |  Branch (2997:17): [True: 15.1M, False: 181M]
  ------------------
 2998|  15.1M|                    const auto &ast = *static_cast<const Index *>(f.ast);
 2999|  15.1M|                    const Value &target = f.val;
 3000|  15.1M|                    if (target.t == Value::ARRAY) {
  ------------------
  |  Branch (3000:25): [True: 108k, False: 15.0M]
  ------------------
 3001|   108k|                        const auto *array = static_cast<HeapArray *>(target.v.h);
 3002|   108k|                        if (scratch.t == Value::STRING) {
  ------------------
  |  Branch (3002:29): [True: 6, False: 108k]
  ------------------
 3003|      6|                            const UString &str = static_cast<HeapString *>(scratch.v.h)->value;
 3004|      6|                            throw makeError(
 3005|      6|                                ast.location,
 3006|      6|                                "attempted index an array with string \""
 3007|      6|                                + encode_utf8(jsonnet_string_escape(str, false)) + "\".");
 3008|      6|                        }
 3009|   108k|                        if (scratch.t != Value::NUMBER) {
  ------------------
  |  Branch (3009:29): [True: 5, False: 108k]
  ------------------
 3010|      5|                            throw makeError(
 3011|      5|                                ast.location,
 3012|      5|                                "array index must be number, got " + type_str(scratch) + ".");
 3013|      5|                        }
 3014|   108k|                        double index = ::floor(scratch.v.d);
 3015|   108k|                        long sz = array->elements.size();
 3016|   108k|                        if (index < 0 || index >= sz) {
  ------------------
  |  Branch (3016:29): [True: 2, False: 108k]
  |  Branch (3016:42): [True: 2, False: 108k]
  ------------------
 3017|      4|                            std::stringstream ss;
 3018|      4|                            ss << "array bounds error: " << index << " not within [0, " << sz
 3019|      4|                               << ")";
 3020|      4|                            throw makeError(ast.location, ss.str());
 3021|      4|                        }
 3022|   108k|                        if (scratch.v.d != index) {
  ------------------
  |  Branch (3022:29): [True: 1, False: 108k]
  ------------------
 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|   108k|                        auto *thunk = array->elements[size_t(index)];
 3029|   108k|                        if (thunk->filled) {
  ------------------
  |  Branch (3029:29): [True: 55.9k, False: 52.2k]
  ------------------
 3030|  55.9k|                            scratch = thunk->content;
 3031|  55.9k|                        } else {
 3032|  52.2k|                            stack.pop();
 3033|  52.2k|                            stack.newCall(
 3034|  52.2k|                                ast.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 3035|  52.2k|                            ast_ = thunk->body;
 3036|  52.2k|                            goto recurse;
 3037|  52.2k|                        }
 3038|  15.0M|                    } else if (target.t == Value::OBJECT) {
  ------------------
  |  Branch (3038:32): [True: 14.7M, False: 373k]
  ------------------
 3039|  14.7M|                        auto *obj = static_cast<HeapObject *>(target.v.h);
 3040|  14.7M|                        assert(obj != nullptr);
  ------------------
  |  Branch (3040:25): [True: 14.7M, False: 0]
  ------------------
 3041|  14.7M|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (3041:29): [True: 4, False: 14.7M]
  ------------------
 3042|      4|                            throw makeError(
 3043|      4|                                ast.location,
 3044|      4|                                "object index must be string, got " + type_str(scratch) + ".");
 3045|      4|                        }
 3046|  14.7M|                        const UString &index_name = static_cast<HeapString *>(scratch.v.h)->value;
 3047|  14.7M|                        auto *fid = alloc->makeIdentifier(index_name);
 3048|  14.7M|                        stack.pop();
 3049|  14.7M|                        ast_ = objectIndex(ast.location, obj, fid, 0);
 3050|  14.7M|                        goto recurse;
 3051|  14.7M|                    } else if (target.t == Value::STRING) {
  ------------------
  |  Branch (3051:32): [True: 373k, False: 0]
  ------------------
 3052|   373k|                        auto *obj = static_cast<HeapString *>(target.v.h);
 3053|   373k|                        assert(obj != nullptr);
  ------------------
  |  Branch (3053:25): [True: 373k, False: 0]
  ------------------
 3054|   373k|                        if (scratch.t != Value::NUMBER) {
  ------------------
  |  Branch (3054:29): [True: 5, False: 373k]
  ------------------
 3055|      5|                            throw makeError(
 3056|      5|                                ast.location,
 3057|      5|                                "string index must be a number, got " + type_str(scratch) + ".");
 3058|      5|                        }
 3059|   373k|                        long sz = obj->value.length();
 3060|   373k|                        long i = (long)scratch.v.d;
 3061|   373k|                        if (i < 0 || i >= sz) {
  ------------------
  |  Branch (3061:29): [True: 55, False: 373k]
  |  Branch (3061:38): [True: 49, False: 373k]
  ------------------
 3062|    104|                            std::stringstream ss;
 3063|    104|                            ss << "string bounds error: " << i << " not within [0, " << sz << ")";
 3064|    104|                            throw makeError(ast.location, ss.str());
 3065|    104|                        }
 3066|   373k|                        char32_t ch[] = {obj->value[i], U'\0'};
 3067|   373k|                        scratch = makeString(ch);
 3068|   373k|                    } else {
 3069|      0|                        std::cerr << "INTERNAL ERROR: not object / array / string." << std::endl;
 3070|      0|                        abort();
 3071|      0|                    }
 3072|  15.1M|                } break;
 3073|       |
 3074|  15.1M|                case FRAME_INDEX_TARGET: {
  ------------------
  |  Branch (3074:17): [True: 15.1M, False: 181M]
  ------------------
 3075|  15.1M|                    const auto &ast = *static_cast<const Index *>(f.ast);
 3076|  15.1M|                    if (scratch.t != Value::ARRAY && scratch.t != Value::OBJECT &&
  ------------------
  |  Branch (3076:25): [True: 15.0M, False: 108k]
  |  Branch (3076:54): [True: 373k, False: 14.7M]
  ------------------
 3077|   373k|                        scratch.t != Value::STRING) {
  ------------------
  |  Branch (3077:25): [True: 8, False: 373k]
  ------------------
 3078|      8|                        throw makeError(ast.location,
 3079|      8|                                        "can only index objects, strings, and arrays, got " +
 3080|      8|                                            type_str(scratch) + ".");
 3081|      8|                    }
 3082|  15.1M|                    f.val = scratch;
 3083|  15.1M|                    f.kind = FRAME_INDEX_INDEX;
 3084|  15.1M|                    if (scratch.t == Value::OBJECT) {
  ------------------
  |  Branch (3084:25): [True: 14.7M, False: 482k]
  ------------------
 3085|  14.7M|                        auto *self = static_cast<HeapObject *>(scratch.v.h);
 3086|  14.7M|                        if (!stack.alreadyExecutingInvariants(self)) {
  ------------------
  |  Branch (3086:29): [True: 14.7M, False: 303]
  ------------------
 3087|  14.7M|                            stack.newFrame(FRAME_INVARIANTS, ast.location);
 3088|  14.7M|                            Frame &f2 = stack.top();
 3089|  14.7M|                            f2.self = self;
 3090|  14.7M|                            unsigned counter = 0;
 3091|  14.7M|                            objectInvariants(self, self, counter, f2.thunks);
 3092|  14.7M|                            if (f2.thunks.size() > 0) {
  ------------------
  |  Branch (3092:33): [True: 559, False: 14.7M]
  ------------------
 3093|    559|                                auto *thunk = f2.thunks[0];
 3094|    559|                                f2.elementId = 1;
 3095|    559|                                stack.newCall(ast.location,
 3096|    559|                                              thunk,
 3097|    559|                                              thunk->self,
 3098|    559|                                              thunk->offset,
 3099|    559|                                              thunk->upValues);
 3100|    559|                                ast_ = thunk->body;
 3101|    559|                                goto recurse;
 3102|    559|                            }
 3103|  14.7M|                        }
 3104|  14.7M|                    }
 3105|  15.1M|                    ast_ = ast.index;
 3106|  15.1M|                    goto recurse;
 3107|  15.1M|                } break;
 3108|       |
 3109|  14.8M|                case FRAME_INVARIANTS: {
  ------------------
  |  Branch (3109:17): [True: 14.8M, False: 181M]
  ------------------
 3110|  14.8M|                    if (f.elementId >= f.thunks.size()) {
  ------------------
  |  Branch (3110:25): [True: 14.7M, False: 76.5k]
  ------------------
 3111|  14.7M|                        if (stack.size() == initial_stack_size + 1) {
  ------------------
  |  Branch (3111:29): [True: 15.2k, False: 14.7M]
  ------------------
 3112|       |                            // Just pop, evaluate was invoked by runInvariants.
 3113|  15.2k|                            break;
 3114|  15.2k|                        }
 3115|  14.7M|                        stack.pop();
 3116|  14.7M|                        Frame &f2 = stack.top();
 3117|  14.7M|                        const auto &ast = *static_cast<const Index *>(f2.ast);
 3118|  14.7M|                        ast_ = ast.index;
 3119|  14.7M|                        goto recurse;
 3120|  14.7M|                    }
 3121|  76.5k|                    auto *thunk = f.thunks[f.elementId++];
 3122|  76.5k|                    stack.newCall(f.location, thunk, thunk->self, thunk->offset, thunk->upValues);
 3123|  76.5k|                    ast_ = thunk->body;
 3124|  76.5k|                    goto recurse;
 3125|  14.8M|                } break;
 3126|       |
 3127|  7.24M|                case FRAME_LOCAL: {
  ------------------
  |  Branch (3127:17): [True: 7.24M, False: 189M]
  ------------------
 3128|       |                    // Result of execution is in scratch already.
 3129|  7.24M|                } break;
 3130|       |
 3131|  2.12M|                case FRAME_OBJECT: {
  ------------------
  |  Branch (3131:17): [True: 2.12M, False: 194M]
  ------------------
 3132|  2.12M|                    const auto &ast = *static_cast<const DesugaredObject *>(f.ast);
 3133|  2.12M|                    if (scratch.t != Value::NULL_TYPE) {
  ------------------
  |  Branch (3133:25): [True: 2.12M, False: 0]
  ------------------
 3134|  2.12M|                        if (scratch.t != Value::STRING) {
  ------------------
  |  Branch (3134:29): [True: 3, False: 2.12M]
  ------------------
 3135|      3|                            throw makeError(ast.location, "field name was not a string.");
 3136|      3|                        }
 3137|  2.12M|                        const auto &fname = static_cast<const HeapString *>(scratch.v.h)->value;
 3138|  2.12M|                        const Identifier *fid = alloc->makeIdentifier(fname);
 3139|  2.12M|                        if (f.objectFields.find(fid) != f.objectFields.end()) {
  ------------------
  |  Branch (3139:29): [True: 5, False: 2.12M]
  ------------------
 3140|      5|                            std::string msg =
 3141|      5|                                "duplicate field name: \"" + encode_utf8(fname) + "\"";
 3142|      5|                            throw makeError(ast.location, msg);
 3143|      5|                        }
 3144|  2.12M|                        f.objectFields[fid].hide = f.fit->hide;
 3145|  2.12M|                        f.objectFields[fid].body = f.fit->body;
 3146|  2.12M|                    }
 3147|  2.12M|                    f.fit++;
 3148|  2.12M|                    if (f.fit != ast.fields.end()) {
  ------------------
  |  Branch (3148:25): [True: 1.54M, False: 588k]
  ------------------
 3149|  1.54M|                        ast_ = f.fit->name;
 3150|  1.54M|                        goto recurse;
 3151|  1.54M|                    } else {
 3152|   588k|                        auto env = capture(ast.freeVariables);
 3153|   588k|                        scratch = makeObject<HeapSimpleObject>(env, f.objectFields, ast.asserts);
 3154|   588k|                    }
 3155|  2.12M|                } break;
 3156|       |
 3157|   588k|                case FRAME_OBJECT_COMP_ARRAY: {
  ------------------
  |  Branch (3157:17): [True: 0, False: 196M]
  ------------------
 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: 196M]
  ------------------
 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|  2.29M|                case FRAME_STRING_CONCAT: {
  ------------------
  |  Branch (3209:17): [True: 2.29M, False: 194M]
  ------------------
 3210|  2.29M|                    const auto &ast = *static_cast<const Binary *>(f.ast);
 3211|  2.29M|                    const Value &lhs = stack.top().val;
 3212|  2.29M|                    UString output;
 3213|  2.29M|                    if (lhs.t == Value::STRING) {
  ------------------
  |  Branch (3213:25): [True: 2.26M, False: 29.6k]
  ------------------
 3214|  2.26M|                        output.append(static_cast<const HeapString *>(lhs.v.h)->value);
 3215|  2.26M|                    } else {
 3216|  29.6k|                        scratch = lhs;
 3217|  29.6k|                        output.append(toString(ast.left->location));
 3218|  29.6k|                    }
 3219|  2.29M|                    const Value &rhs = stack.top().val2;
 3220|  2.29M|                    if (rhs.t == Value::STRING) {
  ------------------
  |  Branch (3220:25): [True: 2.24M, False: 46.5k]
  ------------------
 3221|  2.24M|                        output.append(static_cast<const HeapString *>(rhs.v.h)->value);
 3222|  2.24M|                    } else {
 3223|  46.5k|                        scratch = rhs;
 3224|  46.5k|                        output.append(toString(ast.right->location));
 3225|  46.5k|                    }
 3226|  2.29M|                    scratch = makeString(output);
 3227|  2.29M|                } break;
 3228|       |
 3229|  2.44M|                case FRAME_UNARY: {
  ------------------
  |  Branch (3229:17): [True: 2.44M, False: 194M]
  ------------------
 3230|  2.44M|                    const auto &ast = *static_cast<const Unary *>(f.ast);
 3231|  2.44M|                    switch (scratch.t) {
 3232|  2.32M|                        case Value::BOOLEAN:
  ------------------
  |  Branch (3232:25): [True: 2.32M, False: 116k]
  ------------------
 3233|  2.32M|                            if (ast.op == UOP_NOT) {
  ------------------
  |  Branch (3233:33): [True: 2.32M, False: 2]
  ------------------
 3234|  2.32M|                                scratch = makeBoolean(!scratch.v.b);
 3235|  2.32M|                            } 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|  2.32M|                            break;
 3241|       |
 3242|  2.32M|                        case Value::NUMBER:
  ------------------
  |  Branch (3242:25): [True: 116k, False: 2.32M]
  ------------------
 3243|   116k|                            switch (ast.op) {
 3244|  12.3k|                                case UOP_PLUS: break;
  ------------------
  |  Branch (3244:33): [True: 12.3k, False: 104k]
  ------------------
 3245|       |
 3246|  94.9k|                                case UOP_MINUS: scratch = makeNumber(-scratch.v.d); break;
  ------------------
  |  Branch (3246:33): [True: 94.9k, False: 21.4k]
  ------------------
 3247|       |
 3248|  9.05k|                                case UOP_BITWISE_NOT:
  ------------------
  |  Branch (3248:33): [True: 9.05k, False: 107k]
  ------------------
 3249|  9.05k|                                    scratch = makeNumber(~(long)(scratch.v.d));
 3250|  9.05k|                                    break;
 3251|       |
 3252|     21|                                default:
  ------------------
  |  Branch (3252:33): [True: 21, False: 116k]
  ------------------
 3253|     21|                                    throw makeError(ast.location,
 3254|     21|                                                    "unary operator " + uop_string(ast.op) +
 3255|     21|                                                        " does not operate on numbers.");
 3256|   116k|                            }
 3257|   116k|                            break;
 3258|       |
 3259|   116k|                        default:
  ------------------
  |  Branch (3259:25): [True: 61, False: 2.44M]
  ------------------
 3260|     61|                            throw makeError(ast.location,
 3261|     61|                                            "unary operator " + uop_string(ast.op) +
 3262|     61|                                                " does not operate on type " + type_str(scratch));
 3263|  2.44M|                    }
 3264|  2.44M|                } break;
 3265|       |
 3266|  2.44M|                case FRAME_BUILTIN_JOIN_STRINGS: {
  ------------------
  |  Branch (3266:17): [True: 0, False: 196M]
  ------------------
 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: 196M]
  ------------------
 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: 196M]
  ------------------
 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: 196M]
  ------------------
 3295|      0|                    std::cerr << "INTERNAL ERROR: Unknown FrameKind:  " << f.kind << std::endl;
 3296|      0|                    std::abort();
 3297|   196M|            }
 3298|       |
 3299|  87.0M|        popframe:;
 3300|       |
 3301|  87.0M|            stack.pop();
 3302|       |
 3303|   102M|        replaceframe:;
 3304|   102M|        }
 3305|  96.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack8newFrameIJNS1_9FrameKindEPKNS0_3ASTEEEEvDpT_:
  388|  75.0M|    {
  389|  75.0M|        stack.emplace_back(args...);
  390|  75.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15FrameC2ERKNS1_9FrameKindEPKNS0_3ASTE:
  194|  75.0M|        : kind(kind),
  195|  75.0M|          ast(ast),
  196|  75.0M|          location(ast->location),
  197|  75.0M|          tailCall(false),
  198|  75.0M|          elementId(0),
  199|  75.0M|          first(false),
  200|  75.0M|          context(NULL),
  201|  75.0M|          self(NULL),
  202|  75.0M|          offset(0)
  203|  75.0M|    {
  204|  75.0M|        val.t = Value::NULL_TYPE;
  205|  75.0M|        val2.t = Value::NULL_TYPE;
  206|  75.0M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack14getSelfBindingERPNS1_10HeapObjectERj:
  444|  43.8M|    {
  445|  43.8M|        self = nullptr;
  446|  43.8M|        offset = 0;
  447|   146M|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (447:40): [True: 146M, False: 16.1k]
  ------------------
  448|   146M|            if (stack[i].isCall()) {
  ------------------
  |  Branch (448:17): [True: 43.8M, False: 102M]
  ------------------
  449|  43.8M|                self = stack[i].self;
  450|  43.8M|                offset = stack[i].offset;
  451|  43.8M|                return;
  452|  43.8M|            }
  453|   146M|        }
  454|  43.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  577|  32.8M|    {
  578|  32.8M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  32.8M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 33.8k, False: 32.8M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  33.8k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  33.8k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  33.8k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  33.8k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 33.8k]
  ------------------
  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|  5.45M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 5.45M, False: 33.8k]
  ------------------
  597|  5.45M|                heap.markFrom(sourceVal.second);
  598|  5.45M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  33.8k|            heap.sweep();
  602|  33.8k|        }
  603|  32.8M|        return r;
  604|  32.8M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter7captureERKNSt3__16vectorIPKNS0_10IdentifierENS3_9allocatorIS7_EEEE:
  861|  62.5M|    {
  862|  62.5M|        BindingFrame env;
  863|  1.41G|        for (auto fv : free_vars) {
  ------------------
  |  Branch (863:22): [True: 1.41G, False: 62.5M]
  ------------------
  864|  1.41G|            auto *th = stack.lookUpVar(fv);
  865|  1.41G|            env[fv] = th;
  866|  1.41G|        }
  867|  62.5M|        return env;
  868|  62.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack8newFrameIJNS1_9FrameKindENS0_13LocationRangeEEEEvDpT_:
  388|  14.9M|    {
  389|  14.9M|        stack.emplace_back(args...);
  390|  14.9M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11makeClosureERKNSt3__13mapIPKNS0_10IdentifierEPNS1_9HeapThunkENS3_4lessIS7_EENS3_9allocatorINS3_4pairIKS7_S9_EEEEEEPNS1_10HeapObjectEjRKNS3_6vectorINS1_11HeapClosure5ParamENSC_ISO_EEEEPNS0_3ASTE:
  650|  2.66M|    {
  651|  2.66M|        Value r;
  652|  2.66M|        r.t = Value::FUNCTION;
  653|  2.66M|        r.v.h = makeHeap<HeapClosure>(env, self, offset, params, body, "");
  654|  2.66M|        return r;
  655|  2.66M|    }
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|  2.66M|    {
  578|  2.66M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  2.66M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 3.74k, False: 2.66M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  3.74k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  3.74k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  3.74k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  3.74k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 3.74k]
  ------------------
  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|   602k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 602k, False: 3.74k]
  ------------------
  597|   602k|                heap.markFrom(sourceVal.second);
  598|   602k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  3.74k|            heap.sweep();
  602|  3.74k|        }
  603|  2.66M|        return r;
  604|  2.66M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter6importERKNS0_13LocationRangeEPKNS0_13LiteralStringE:
  792|      6|    {
  793|      6|        ImportCacheValue *input = importData(loc, file);
  794|      6|        if (input->thunk == nullptr) {
  ------------------
  |  Branch (794:13): [True: 0, False: 6]
  ------------------
  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|      6|        return input->thunk;
  804|      6|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10importDataERKNS0_13LocationRangeEPKNS0_13LiteralStringE:
  816|     18|    {
  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|     18|        std::string dir = path_dir_with_trailing_separator(loc.file);
  822|       |
  823|     18|        const UString &path = file->value;
  824|       |
  825|     18|        std::pair<std::string, UString> key(dir, path);
  826|     18|        ImportCacheValue *cached_value = cachedImports[key];
  827|     18|        if (cached_value != nullptr)
  ------------------
  |  Branch (827:13): [True: 0, False: 18]
  ------------------
  828|      0|            return cached_value;
  829|       |
  830|     18|        char *found_here_cptr;
  831|     18|        char *buf = NULL;
  832|     18|        size_t buflen = 0;
  833|     18|        int result = importCallback(importCallbackContext,
  834|     18|                                    dir.c_str(),
  835|     18|                                    encode_utf8(path).c_str(),
  836|     18|                                    &found_here_cptr,
  837|     18|                                    &buf,
  838|     18|                                    &buflen);
  839|       |
  840|     18|        std::string input(buf, buflen);
  841|     18|        ::free(buf);
  842|       |
  843|     18|        if (result == 1) {  // failure
  ------------------
  |  Branch (843:13): [True: 18, False: 0]
  ------------------
  844|     18|            std::string epath = encode_utf8(jsonnet_string_escape(path, false));
  845|     18|            std::string msg = "couldn't open import \"" + epath + "\": ";
  846|     18|            msg += input;
  847|     18|            throw makeError(loc, msg);
  848|     18|        }
  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|     18|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRKPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPNS0_3ASTEEEEPT_DpOT0_:
  577|  24.7M|    {
  578|  24.7M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  24.7M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 30.3k, False: 24.6M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  30.3k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  30.3k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  30.3k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  30.3k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 30.3k]
  ------------------
  591|      0|                HeapThunk *thunk = pair.second->thunk;
  592|      0|                if (thunk != nullptr)
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                    heap.markFrom(thunk);
  594|      0|            }
  595|       |
  596|  4.88M|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 4.88M, False: 30.3k]
  ------------------
  597|  4.88M|                heap.markFrom(sourceVal.second);
  598|  4.88M|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  30.3k|            heap.sweep();
  602|  30.3k|        }
  603|  24.7M|        return r;
  604|  24.7M|    }
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.73M|    {
  672|  1.73M|        Value r;
  673|  1.73M|        r.t = Value::OBJECT;
  674|  1.73M|        r.v.h = makeHeap<T>(args...);
  675|  1.73M|        return r;
  676|  1.73M|    }
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.73M|    {
  578|  1.73M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  1.73M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 2.27k, False: 1.73M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  2.27k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  2.27k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  2.27k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  2.27k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 2.27k]
  ------------------
  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|   366k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 366k, False: 2.27k]
  ------------------
  597|   366k|                heap.markFrom(sourceVal.second);
  598|   366k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  2.27k|            heap.sweep();
  602|  2.27k|        }
  603|  1.73M|        return r;
  604|  1.73M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack9lookUpVarEPKNS0_10IdentifierE:
  269|  1.45G|    {
  270|  2.11G|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (270:40): [True: 2.11G, False: 0]
  ------------------
  271|  2.11G|            const auto &binds = stack[i].bindings;
  272|  2.11G|            auto it = binds.find(id);
  273|  2.11G|            if (it != binds.end()) {
  ------------------
  |  Branch (273:17): [True: 1.45G, False: 662M]
  ------------------
  274|  1.45G|                return it->second;
  275|  1.45G|            }
  276|   662M|            if (stack[i].isCall())
  ------------------
  |  Branch (276:17): [True: 0, False: 662M]
  ------------------
  277|      0|                break;
  278|   662M|        }
  279|      0|        return nullptr;
  280|  1.45G|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack4sizeEv:
  263|   218M|    {
  264|   218M|        return stack.size();
  265|   218M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRKPKNS0_3ASTEEEEPT_DpOT0_:
  577|    240|    {
  578|    240|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|    240|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 0, False: 240]
  ------------------
  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|    240|        return r;
  604|    240|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10findObjectEPKNS0_10IdentifierEPNS1_10HeapObjectEjRj:
  698|   561M|    {
  699|   561M|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(curr)) {
  ------------------
  |  Branch (699:19): [True: 273M, False: 287M]
  ------------------
  700|   273M|            auto *r = findObject(f, ext->right, start_from, counter);
  701|   273M|            if (r)
  ------------------
  |  Branch (701:17): [True: 3.33M, False: 269M]
  ------------------
  702|  3.33M|                return r;
  703|   269M|            auto *l = findObject(f, ext->left, start_from, counter);
  704|   269M|            if (l)
  ------------------
  |  Branch (704:17): [True: 235M, False: 34.5M]
  ------------------
  705|   235M|                return l;
  706|   287M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(curr)) {
  ------------------
  |  Branch (706:26): [True: 0, False: 287M]
  ------------------
  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|   287M|        } else {
  717|   287M|            if (counter >= start_from) {
  ------------------
  |  Branch (717:17): [True: 25.3M, False: 262M]
  ------------------
  718|  25.3M|                if (auto *simp = dynamic_cast<HeapSimpleObject *>(curr)) {
  ------------------
  |  Branch (718:27): [True: 25.3M, False: 0]
  ------------------
  719|  25.3M|                    auto it = simp->fields.find(f);
  720|  25.3M|                    if (it != simp->fields.end()) {
  ------------------
  |  Branch (720:25): [True: 18.1M, False: 7.21M]
  ------------------
  721|  18.1M|                        return simp;
  722|  18.1M|                    }
  723|  25.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|  25.3M|            }
  730|   269M|            counter++;
  731|   269M|        }
  732|   304M|        return nullptr;
  733|   561M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13callSourceValEPKNS0_3ASTEPNS1_9HeapThunkENSt3__16vectorIS7_NS8_9allocatorIS7_EEEE:
 2070|  20.8k|    const AST *callSourceVal(const AST *ast, HeapThunk *sourceVal, std::vector<HeapThunk*> args) {
 2071|  20.8k|        assert(sourceVal != nullptr);
  ------------------
  |  Branch (2071:9): [True: 20.8k, False: 0]
  ------------------
 2072|  20.8k|        assert(sourceVal->filled);
  ------------------
  |  Branch (2072:9): [True: 20.8k, False: 0]
  ------------------
 2073|  20.8k|        assert(sourceVal->content.t == Value::FUNCTION);
  ------------------
  |  Branch (2073:9): [True: 20.8k, False: 0]
  ------------------
 2074|  20.8k|        auto *func = static_cast<HeapClosure *>(sourceVal->content.v.h);
 2075|  20.8k|        BindingFrame up_values = func->upValues;
 2076|  62.6k|        for (size_t i = 0; i < args.size(); ++i) {
  ------------------
  |  Branch (2076:28): [True: 41.7k, False: 20.8k]
  ------------------
 2077|  41.7k|            up_values.insert({func->params[i].id, args[i]});
 2078|  41.7k|        }
 2079|  20.8k|        stack.newCall(ast->location, func, func->self, func->offset, up_values);
 2080|  20.8k|        return func->body;
 2081|  20.8k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter17safeDoubleToInt64EdRKNS0_13LocationRangeE:
  919|  33.2k|    int64_t safeDoubleToInt64(double value, const internal::LocationRange& loc) {
  920|  33.2k|        if (std::isnan(value) || std::isinf(value)) {
  ------------------
  |  Branch (920:13): [True: 0, False: 33.2k]
  |  Branch (920:34): [True: 0, False: 33.2k]
  ------------------
  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|  33.2k|        constexpr int64_t DOUBLE_MAX_SAFE_INTEGER = (1LL << 53) - 1;
  927|  33.2k|        constexpr int64_t DOUBLE_MIN_SAFE_INTEGER = -((1LL << 53) - 1);
  928|       |
  929|       |        // Check if the value is within the safe integer range
  930|  33.2k|        if (value < DOUBLE_MIN_SAFE_INTEGER || value > DOUBLE_MAX_SAFE_INTEGER) {
  ------------------
  |  Branch (930:13): [True: 1, False: 33.2k]
  |  Branch (930:48): [True: 8, False: 33.2k]
  ------------------
  931|      9|            throw makeError(loc, "numeric value outside safe integer range for bitwise operation.");
  932|      9|        }
  933|  33.2k|        return static_cast<int64_t>(value);
  934|  33.2k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter10makeObjectINS1_18HeapExtendedObjectEJPNS1_10HeapObjectES6_EEENS1_5ValueEDpT0_:
  671|  1.26M|    {
  672|  1.26M|        Value r;
  673|  1.26M|        r.t = Value::OBJECT;
  674|  1.26M|        r.v.h = makeHeap<T>(args...);
  675|  1.26M|        return r;
  676|  1.26M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_18HeapExtendedObjectEJRPNS1_10HeapObjectES7_EEEPT_DpOT0_:
  577|  1.26M|    {
  578|  1.26M|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|  1.26M|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 1.39k, False: 1.26M]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|  1.39k|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|  1.39k|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|  1.39k|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|  1.39k|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 1.39k]
  ------------------
  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|   224k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 224k, False: 1.39k]
  ------------------
  597|   224k|                heap.markFrom(sourceVal.second);
  598|   224k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|  1.39k|            heap.sweep();
  602|  1.39k|        }
  603|  1.26M|        return r;
  604|  1.26M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8toStringERKNS0_13LocationRangeE:
 1979|  76.1k|    {
 1980|  76.1k|        return manifestJson(loc, false, U"");
 1981|  76.1k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11countLeavesEPNS1_10HeapObjectE:
  876|  1.65G|    {
  877|  1.65G|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(obj)) {
  ------------------
  |  Branch (877:19): [True: 825M, False: 828M]
  ------------------
  878|   825M|            return countLeaves(ext->left) + countLeaves(ext->right);
  879|   828M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(obj)) {
  ------------------
  |  Branch (879:26): [True: 0, False: 828M]
  ------------------
  880|      0|            return countLeaves(ext->obj) + 1;
  881|   828M|        } else {
  882|       |            // Must be a HeapLeafObject.
  883|   828M|            return 1;
  884|   828M|        }
  885|  1.65G|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter11objectIndexERKNS0_13LocationRangeEPNS1_10HeapObjectEPKNS0_10IdentifierEj:
 2018|  16.5M|    {
 2019|  16.5M|        unsigned found_at = 0;
 2020|  16.5M|        HeapObject *self = obj;
 2021|  16.5M|        HeapLeafObject *found = findObject(f, obj, offset, found_at);
 2022|  16.5M|        if (found == nullptr) {
  ------------------
  |  Branch (2022:13): [True: 33, False: 16.5M]
  ------------------
 2023|     33|            throw makeError(loc, "field does not exist: " + encode_utf8(f->name));
 2024|     33|        }
 2025|  16.5M|        if (auto *simp = dynamic_cast<HeapSimpleObject *>(found)) {
  ------------------
  |  Branch (2025:19): [True: 16.5M, False: 0]
  ------------------
 2026|  16.5M|            auto it = simp->fields.find(f);
 2027|  16.5M|            const AST *body = it->second.body;
 2028|       |
 2029|  16.5M|            stack.newCall(loc, simp, self, found_at, simp->upValues);
 2030|  16.5M|            return body;
 2031|  16.5M|        } 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|  16.5M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_15Stack26alreadyExecutingInvariantsEPNS1_10HeapObjectE:
  458|  14.9M|    {
  459|  2.79G|        for (int i = stack.size() - 1; i >= 0; --i) {
  ------------------
  |  Branch (459:40): [True: 2.78G, False: 14.9M]
  ------------------
  460|  2.78G|            if (stack[i].kind == FRAME_INVARIANTS) {
  ------------------
  |  Branch (460:17): [True: 8.72M, False: 2.77G]
  ------------------
  461|  8.72M|                if (stack[i].self == self)
  ------------------
  |  Branch (461:21): [True: 609, False: 8.72M]
  ------------------
  462|    609|                    return true;
  463|  8.72M|            }
  464|  2.78G|        }
  465|  14.9M|        return false;
  466|  14.9M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter16objectInvariantsEPNS1_10HeapObjectES4_RjRNSt3__16vectorIPNS1_9HeapThunkENS6_9allocatorIS9_EEEE:
 1992|  31.7M|    {
 1993|  31.7M|        if (auto *ext = dynamic_cast<HeapExtendedObject *>(curr)) {
  ------------------
  |  Branch (1993:19): [True: 8.41M, False: 23.3M]
  ------------------
 1994|  8.41M|            objectInvariants(ext->right, self, counter, thunks);
 1995|  8.41M|            objectInvariants(ext->left, self, counter, thunks);
 1996|  23.3M|        } else if (auto *ext = dynamic_cast<HeapRestrictedObject *>(curr)) {
  ------------------
  |  Branch (1996:26): [True: 0, False: 23.3M]
  ------------------
 1997|      0|            objectInvariants(ext->obj, self, counter, thunks);
 1998|  23.3M|        } else {
 1999|  23.3M|            if (auto *simp = dynamic_cast<HeapSimpleObject *>(curr)) {
  ------------------
  |  Branch (1999:23): [True: 23.3M, False: 0]
  ------------------
 2000|  23.3M|                for (AST *assert : simp->asserts) {
  ------------------
  |  Branch (2000:34): [True: 129k, False: 23.3M]
  ------------------
 2001|   129k|                    auto *el_th = makeHeap<HeapThunk>(idInvariant, self, counter, assert);
 2002|   129k|                    el_th->upValues = simp->upValues;
 2003|   129k|                    thunks.push_back(el_th);
 2004|   129k|                }
 2005|  23.3M|            }
 2006|  23.3M|            counter++;
 2007|  23.3M|        }
 2008|  31.7M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter8makeHeapINS1_9HeapThunkEJRPKNS0_10IdentifierERPNS1_10HeapObjectERjRPNS0_3ASTEEEEPT_DpOT0_:
  577|   129k|    {
  578|   129k|        T *r = heap.makeEntity<T, Args...>(std::forward<Args>(args)...);
  579|   129k|        if (heap.checkHeap()) {  // Do a GC cycle?
  ------------------
  |  Branch (579:13): [True: 298, False: 129k]
  ------------------
  580|       |            // Avoid the object we just made being collected.
  581|    298|            heap.markFrom(r);
  582|       |
  583|       |            // Mark from the stack.
  584|    298|            stack.mark(heap);
  585|       |
  586|       |            // Mark from the scratch register
  587|    298|            heap.markFrom(scratch);
  588|       |
  589|       |            // Mark from cached imports
  590|    298|            for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (590:35): [True: 0, False: 298]
  ------------------
  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|  47.9k|            for (const auto &sourceVal : sourceVals) {
  ------------------
  |  Branch (596:40): [True: 47.9k, False: 298]
  ------------------
  597|  47.9k|                heap.markFrom(sourceVal.second);
  598|  47.9k|            }
  599|       |
  600|       |            // Delete unreachable objects.
  601|    298|            heap.sweep();
  602|    298|        }
  603|   129k|        return r;
  604|   129k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter12manifestJsonERKNS0_13LocationRangeEbRKNSt3__112basic_stringIDiNS6_11char_traitsIDiEENS6_9allocatorIDiEEEE:
 3315|  3.38M|    {
 3316|       |        // Printing fields means evaluating and binding them, which can trigger
 3317|       |        // garbage collection.
 3318|       |
 3319|  3.38M|        UStringStream ss;
 3320|  3.38M|        switch (scratch.t) {
  ------------------
  |  Branch (3320:17): [True: 3.38M, False: 0]
  ------------------
 3321|  39.1k|            case Value::ARRAY: {
  ------------------
  |  Branch (3321:13): [True: 39.1k, False: 3.34M]
  ------------------
 3322|  39.1k|                HeapArray *arr = static_cast<HeapArray *>(scratch.v.h);
 3323|  39.1k|                if (arr->elements.size() == 0) {
  ------------------
  |  Branch (3323:21): [True: 4.12k, False: 35.0k]
  ------------------
 3324|  4.12k|                    ss << U"[ ]";
 3325|  35.0k|                } else {
 3326|  35.0k|                    const char32_t *prefix = multiline ? U"[\n" : U"[";
  ------------------
  |  Branch (3326:46): [True: 20.1k, False: 14.9k]
  ------------------
 3327|  35.0k|                    UString indent2 = multiline ? indent + U"   " : indent;
  ------------------
  |  Branch (3327:39): [True: 20.1k, False: 14.9k]
  ------------------
 3328|  2.97M|                    for (auto *thunk : arr->elements) {
  ------------------
  |  Branch (3328:38): [True: 2.97M, False: 35.0k]
  ------------------
 3329|  2.97M|                        LocationRange tloc = thunk->body == nullptr ? loc : thunk->body->location;
  ------------------
  |  Branch (3329:46): [True: 0, False: 2.97M]
  ------------------
 3330|  2.97M|                        if (thunk->filled) {
  ------------------
  |  Branch (3330:29): [True: 0, False: 2.97M]
  ------------------
 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|  2.97M|                        } else {
 3336|  2.97M|                            stack.newCall(loc, thunk, thunk->self, thunk->offset, thunk->upValues);
 3337|       |                            // Keep arr alive when scratch is overwritten
 3338|  2.97M|                            stack.top().val = scratch;
 3339|  2.97M|                            evaluate(thunk->body, stack.size());
 3340|  2.97M|                        }
 3341|  2.97M|                        auto element = manifestJson(tloc, multiline, indent2);
 3342|       |                        // Restore scratch
 3343|  2.97M|                        scratch = stack.top().val;
 3344|  2.97M|                        stack.pop();
 3345|  2.97M|                        ss << prefix << indent2 << element;
 3346|  2.97M|                        prefix = multiline ? U",\n" : U", ";
  ------------------
  |  Branch (3346:34): [True: 2.93M, False: 34.3k]
  ------------------
 3347|  2.97M|                    }
 3348|  35.0k|                    ss << (multiline ? U"\n" : U"") << indent << U"]";
  ------------------
  |  Branch (3348:28): [True: 9.82k, False: 25.2k]
  ------------------
 3349|  35.0k|                }
 3350|  39.1k|            } break;
 3351|       |
 3352|   176k|            case Value::BOOLEAN: ss << (scratch.v.b ? U"true" : U"false"); break;
  ------------------
  |  Branch (3352:13): [True: 176k, False: 3.21M]
  |  Branch (3352:41): [True: 41.6k, False: 134k]
  ------------------
 3353|       |
 3354|  2.91M|            case Value::NUMBER: ss << decode_utf8(jsonnet_unparse_number(scratch.v.d)); break;
  ------------------
  |  Branch (3354:13): [True: 2.91M, False: 474k]
  ------------------
 3355|       |
 3356|     14|            case Value::FUNCTION:
  ------------------
  |  Branch (3356:13): [True: 14, False: 3.38M]
  ------------------
 3357|     14|                throw makeError(loc, "couldn't manifest function in JSON output.");
 3358|       |
 3359|    530|            case Value::NULL_TYPE: ss << U"null"; break;
  ------------------
  |  Branch (3359:13): [True: 530, False: 3.38M]
  ------------------
 3360|       |
 3361|   213k|            case Value::OBJECT: {
  ------------------
  |  Branch (3361:13): [True: 213k, False: 3.17M]
  ------------------
 3362|   213k|                auto *obj = static_cast<HeapObject *>(scratch.v.h);
 3363|   213k|                runInvariants(loc, obj);
 3364|       |                // Using std::map has the useful side-effect of ordering the fields
 3365|       |                // alphabetically.
 3366|   213k|                std::map<UString, const Identifier *> fields;
 3367|   401k|                for (const auto &f : objectFields(obj, true)) {
  ------------------
  |  Branch (3367:36): [True: 401k, False: 213k]
  ------------------
 3368|   401k|                    fields[f->name] = f;
 3369|   401k|                }
 3370|   213k|                if (fields.size() == 0) {
  ------------------
  |  Branch (3370:21): [True: 31.1k, False: 182k]
  ------------------
 3371|  31.1k|                    ss << U"{ }";
 3372|   182k|                } else {
 3373|   182k|                    UString indent2 = multiline ? indent + U"   " : indent;
  ------------------
  |  Branch (3373:39): [True: 138k, False: 43.2k]
  ------------------
 3374|   182k|                    const char32_t *prefix = multiline ? U"{\n" : U"{";
  ------------------
  |  Branch (3374:46): [True: 138k, False: 43.2k]
  ------------------
 3375|   348k|                    for (const auto &f : fields) {
  ------------------
  |  Branch (3375:40): [True: 348k, False: 182k]
  ------------------
 3376|       |                        // pushes FRAME_CALL
 3377|   348k|                        const AST *body = objectIndex(loc, obj, f.second, 0);
 3378|   348k|                        stack.top().val = scratch;
 3379|   348k|                        evaluate(body, stack.size());
 3380|   348k|                        auto vstr = manifestJson(body->location, multiline, indent2);
 3381|       |                        // Reset scratch so that the object we're manifesting doesn't
 3382|       |                        // get GC'd.
 3383|   348k|                        scratch = stack.top().val;
 3384|   348k|                        stack.pop();
 3385|   348k|                        ss << prefix << indent2 << jsonnet_string_unparse(f.first, false) << U": "
 3386|   348k|                           << vstr;
 3387|   348k|                        prefix = multiline ? U",\n" : U", ";
  ------------------
  |  Branch (3387:34): [True: 188k, False: 160k]
  ------------------
 3388|   348k|                    }
 3389|   182k|                    ss << (multiline ? U"\n" : U"") << indent << U"}";
  ------------------
  |  Branch (3389:28): [True: 31.7k, False: 150k]
  ------------------
 3390|   182k|                }
 3391|   213k|            } break;
 3392|       |
 3393|  45.1k|            case Value::STRING: {
  ------------------
  |  Branch (3393:13): [True: 45.1k, False: 3.34M]
  ------------------
 3394|  45.1k|                const UString &str = static_cast<HeapString *>(scratch.v.h)->value;
 3395|  45.1k|                ss << jsonnet_string_unparse(str, false);
 3396|  45.1k|            } break;
 3397|  3.38M|        }
 3398|  3.24M|        return ss.str();
 3399|  3.38M|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111Interpreter13runInvariantsERKNS0_13LocationRangeEPNS1_10HeapObjectE:
 2044|   213k|    {
 2045|   213k|        if (stack.alreadyExecutingInvariants(self))
  ------------------
  |  Branch (2045:13): [True: 306, False: 212k]
  ------------------
 2046|    306|            return;
 2047|       |
 2048|   212k|        unsigned counter = 0;
 2049|   212k|        unsigned initial_stack_size = stack.size();
 2050|   212k|        stack.newFrame(FRAME_INVARIANTS, loc);
 2051|   212k|        std::vector<HeapThunk *> &thunks = stack.top().thunks;
 2052|   212k|        objectInvariants(self, self, counter, thunks);
 2053|   212k|        if (thunks.size() == 0) {
  ------------------
  |  Branch (2053:13): [True: 196k, False: 16.3k]
  ------------------
 2054|   196k|            stack.pop();
 2055|   196k|            return;
 2056|   196k|        }
 2057|  16.3k|        HeapThunk *thunk = thunks[0];
 2058|  16.3k|        stack.top().elementId = 1;
 2059|  16.3k|        stack.top().self = self;
 2060|  16.3k|        stack.newCall(loc, thunk, thunk->self, thunk->offset, thunk->upValues);
 2061|  16.3k|        evaluate(thunk->body, initial_stack_size);
 2062|  16.3k|    }
vm.cpp:_ZN7jsonnet8internal12_GLOBAL__N_111InterpreterD2Ev:
 1024|  3.23k|    {
 1025|  3.23k|        for (const auto &pair : cachedImports) {
  ------------------
  |  Branch (1025:31): [True: 18, False: 3.23k]
  ------------------
 1026|     18|            delete pair.second;
 1027|     18|        }
 1028|  3.23k|    }

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

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

