diff --git a/src/duk_features.h b/src/duk_features.h index 67c84689..f618fedd 100644 --- a/src/duk_features.h +++ b/src/duk_features.h @@ -1227,6 +1227,15 @@ extern double duk_computed_nan; #undef DUK_USE_SECTION_B #endif +/* + * Function instance features. + */ + +#define DUK_USE_PC2LINE +#if defined(DUK_OPT_NO_PC2LINE) +#undef DUK_USE_PC2LINE +#endif + /* * Deep vs. shallow stack. * diff --git a/src/duk_js_compiler.c b/src/duk_js_compiler.c index 6a7842a2..70b6560f 100644 --- a/src/duk_js_compiler.c +++ b/src/duk_js_compiler.c @@ -837,7 +837,8 @@ static void convert_to_function_template(duk_compiler_ctx *comp_ctx) { } /* _pc2line */ - if (1) { /* FIXME: condition */ +#ifdef DUK_USE_PC2LINE + if (1) { /* * Size-optimized pc->line mapping. */ @@ -846,10 +847,11 @@ static void convert_to_function_template(duk_compiler_ctx *comp_ctx) { duk_hobject_pc2line_pack(thr, q_instr, (duk_uint_fast32_t) code_count); /* -> pushes fixed buffer */ duk_def_prop_stridx(ctx, -2, DUK_STRIDX_INT_PC2LINE, DUK_PROPDESC_FLAGS_NONE); - /* FIXME: if assertions enabled, walk through all valid PCs + /* XXX: if assertions enabled, walk through all valid PCs * and check line mapping. */ } +#endif /* DUK_USE_PC2LINE */ /* fileName */ if (comp_ctx->h_filename) {