mirror of
https://github.com/morluto/rea
synced 2026-10-26 14:25:49 -04:00
fix(javascript): bound primitive string growth and repeated evaluation
This commit is contained in:
@@ -10,6 +10,7 @@ import { semanticCoverageResourceLimits } from "../../domain/javascript/javascri
|
||||
import {
|
||||
SEMANTIC_EXPRESSION_DEPTH_LIMIT,
|
||||
SEMANTIC_PRIMITIVE_CANDIDATE_LIMIT,
|
||||
SEMANTIC_PRIMITIVE_JSON_BYTES_LIMIT,
|
||||
semanticResourceLimitReason,
|
||||
} from "../../domain/javascript/javascriptSemanticResourceLimits.js";
|
||||
import type {
|
||||
@@ -389,11 +390,15 @@ const semanticCoverage = (
|
||||
value:
|
||||
resourceLimit === "primitive-candidates"
|
||||
? SEMANTIC_PRIMITIVE_CANDIDATE_LIMIT
|
||||
: SEMANTIC_EXPRESSION_DEPTH_LIMIT,
|
||||
: resourceLimit === "primitive-bytes"
|
||||
? SEMANTIC_PRIMITIVE_JSON_BYTES_LIMIT
|
||||
: SEMANTIC_EXPRESSION_DEPTH_LIMIT,
|
||||
unit:
|
||||
resourceLimit === "expression-depth"
|
||||
? ("depth" as const)
|
||||
: ("items" as const),
|
||||
: resourceLimit === "primitive-bytes"
|
||||
? ("bytes" as const)
|
||||
: ("items" as const),
|
||||
})),
|
||||
semantic.ir.coverage.omittedCount,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user